hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkey...@apache.org
Subject svn commit: r1528753 - /hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
Date Thu, 03 Oct 2013 08:51:12 GMT
Author: nkeywal
Date: Thu Oct  3 08:51:12 2013
New Revision: 1528753

URL: http://svn.apache.org/r1528753
Log:
HBASE-9701 Make SLEEP_TIME in IntegrationTestMTTR configurable

Modified:
    hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java

Modified: hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java?rev=1528753&r1=1528752&r2=1528753&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
(original)
+++ hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
Thu Oct  3 08:51:12 2013
@@ -119,7 +119,9 @@ public class IntegrationTestMTTR {
    */
   private static final byte[] FAMILY = Bytes.toBytes("d");
   private static final Log LOG = LogFactory.getLog(IntegrationTestMTTR.class);
-  private static final long SLEEP_TIME = 60 * 1000l;
+  private static long sleepTime;
+  private static final String SLEEP_TIME_KEY = "hbase.IntegrationTestMTTR.sleeptime";
+  private static final long SLEEP_TIME_DEFAULT = 60 * 1000l;
 
   /**
    * Configurable table names.
@@ -173,19 +175,20 @@ public class IntegrationTestMTTR {
     setupTables();
 
     // Set up the actions.
+    sleepTime = util.getConfiguration().getLong(SLEEP_TIME_KEY, SLEEP_TIME_DEFAULT);
     setupActions();
   }
 
   private static void setupActions() throws IOException {
     // Set up the action that will restart a region server holding a region from our table
     // because this table should only have one region we should be good.
-    restartRSAction = new RestartRsHoldingTableAction(SLEEP_TIME, tableName.getNameAsString());
+    restartRSAction = new RestartRsHoldingTableAction(sleepTime, tableName.getNameAsString());
 
     // Set up the action that will kill the region holding meta.
-    restartMetaAction = new RestartRsHoldingMetaAction(SLEEP_TIME);
+    restartMetaAction = new RestartRsHoldingMetaAction(sleepTime);
 
     // Set up the action that will move the regions of our table.
-    moveRegionAction = new MoveRegionsOfTableAction(SLEEP_TIME, tableName.getNameAsString());
+    moveRegionAction = new MoveRegionsOfTableAction(sleepTime, tableName.getNameAsString());
 
     // Kill the master
     restartMasterAction = new RestartActiveMasterAction(1000);



Mime
View raw message