hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [3/4] hbase git commit: HBASE-16068 Procedure v2 - use consts for conf properties in tests
Date Thu, 23 Jun 2016 06:53:05 GMT
HBASE-16068 Procedure v2 - use consts for conf properties in tests


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d500f6fd
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d500f6fd
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d500f6fd

Branch: refs/heads/branch-1.3
Commit: d500f6fd055000a1961fb997c42cb4cacb29bcab
Parents: f2405b1
Author: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Authored: Wed Jun 22 22:48:07 2016 -0700
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Wed Jun 22 23:09:28 2016 -0700

----------------------------------------------------------------------
 .../procedure2/store/wal/WALProcedureStore.java   | 18 +++++++++---------
 .../procedure2/TestProcedureReplayOrder.java      |  3 ++-
 .../store/wal/TestStressWALProcedureStore.java    |  6 +++---
 .../procedure/TestMasterProcedureEvents.java      |  3 ++-
 .../procedure/TestWALProcedureStoreOnHDFS.java    |  6 +++---
 5 files changed, 19 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d500f6fd/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
index c8f4946..560072f 100644
--- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
+++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
@@ -71,36 +71,36 @@ public class WALProcedureStore extends ProcedureStoreBase {
     void recoverFileLease(FileSystem fs, Path path) throws IOException;
   }
 
-  private static final String MAX_RETRIES_BEFORE_ROLL_CONF_KEY =
+  public static final String MAX_RETRIES_BEFORE_ROLL_CONF_KEY =
     "hbase.procedure.store.wal.max.retries.before.roll";
   private static final int DEFAULT_MAX_RETRIES_BEFORE_ROLL = 3;
 
-  private static final String WAIT_BEFORE_ROLL_CONF_KEY =
+  public static final String WAIT_BEFORE_ROLL_CONF_KEY =
     "hbase.procedure.store.wal.wait.before.roll";
   private static final int DEFAULT_WAIT_BEFORE_ROLL = 500;
 
-  private static final String ROLL_RETRIES_CONF_KEY =
+  public static final String ROLL_RETRIES_CONF_KEY =
     "hbase.procedure.store.wal.max.roll.retries";
   private static final int DEFAULT_ROLL_RETRIES = 3;
 
-  private static final String MAX_SYNC_FAILURE_ROLL_CONF_KEY =
+  public static final String MAX_SYNC_FAILURE_ROLL_CONF_KEY =
     "hbase.procedure.store.wal.sync.failure.roll.max";
   private static final int DEFAULT_MAX_SYNC_FAILURE_ROLL = 3;
 
-  private static final String PERIODIC_ROLL_CONF_KEY =
+  public static final String PERIODIC_ROLL_CONF_KEY =
     "hbase.procedure.store.wal.periodic.roll.msec";
   private static final int DEFAULT_PERIODIC_ROLL = 60 * 60 * 1000; // 1h
 
-  private static final String SYNC_WAIT_MSEC_CONF_KEY = "hbase.procedure.store.wal.sync.wait.msec";
+  public static final String SYNC_WAIT_MSEC_CONF_KEY = "hbase.procedure.store.wal.sync.wait.msec";
   private static final int DEFAULT_SYNC_WAIT_MSEC = 100;
 
-  private static final String USE_HSYNC_CONF_KEY = "hbase.procedure.store.wal.use.hsync";
+  public static final String USE_HSYNC_CONF_KEY = "hbase.procedure.store.wal.use.hsync";
   private static final boolean DEFAULT_USE_HSYNC = true;
 
-  private static final String ROLL_THRESHOLD_CONF_KEY = "hbase.procedure.store.wal.roll.threshold";
+  public static final String ROLL_THRESHOLD_CONF_KEY = "hbase.procedure.store.wal.roll.threshold";
   private static final long DEFAULT_ROLL_THRESHOLD = 32 * 1024 * 1024; // 32M
 
-  private static final String STORE_WAL_SYNC_STATS_COUNT =
+  public static final String STORE_WAL_SYNC_STATS_COUNT =
       "hbase.procedure.store.wal.sync.stats.count";
   private static final int DEFAULT_SYNC_STATS_COUNT = 10;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/d500f6fd/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java
b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java
index d476c4f..c51f3cf 100644
--- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java
+++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java
@@ -31,6 +31,7 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HBaseCommonTestingUtility;
 import org.apache.hadoop.hbase.io.util.StreamUtils;
 import org.apache.hadoop.hbase.procedure2.store.ProcedureStore;
+import org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore;
 import org.apache.hadoop.hbase.testclassification.LargeTests;
 
 import org.junit.After;
@@ -60,7 +61,7 @@ public class TestProcedureReplayOrder {
   @Before
   public void setUp() throws IOException {
     htu = new HBaseCommonTestingUtility();
-    htu.getConfiguration().setInt("hbase.procedure.store.wal.sync.wait.msec", 25);
+    htu.getConfiguration().setInt(WALProcedureStore.SYNC_WAIT_MSEC_CONF_KEY, 25);
 
     testDir = htu.getDataTestDir();
     fs = testDir.getFileSystem(htu.getConfiguration());

http://git-wip-us.apache.org/repos/asf/hbase/blob/d500f6fd/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/TestStressWALProcedureStore.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/TestStressWALProcedureStore.java
b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/TestStressWALProcedureStore.java
index 1c1af79..023354c 100644
--- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/TestStressWALProcedureStore.java
+++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/TestStressWALProcedureStore.java
@@ -62,9 +62,9 @@ public class TestStressWALProcedureStore {
   private Path logDir;
 
   private void setupConfiguration(Configuration conf) {
-    conf.setBoolean("hbase.procedure.store.wal.use.hsync", false);
-    conf.setInt("hbase.procedure.store.wal.periodic.roll.msec", 5000);
-    conf.setInt("hbase.procedure.store.wal.roll.threshold", 128 * 1024);
+    conf.setBoolean(WALProcedureStore.USE_HSYNC_CONF_KEY, false);
+    conf.setInt(WALProcedureStore.PERIODIC_ROLL_CONF_KEY, 5000);
+    conf.setInt(WALProcedureStore.ROLL_THRESHOLD_CONF_KEY, 128 * 1024);
   }
 
   @Before

http://git-wip-us.apache.org/repos/asf/hbase/blob/d500f6fd/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestMasterProcedureEvents.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestMasterProcedureEvents.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestMasterProcedureEvents.java
index 0027c2f..c1aa7c0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestMasterProcedureEvents.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestMasterProcedureEvents.java
@@ -34,6 +34,7 @@ import org.apache.hadoop.hbase.master.HMaster;
 import org.apache.hadoop.hbase.master.AssignmentManager;
 import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
 import org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility;
+import org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore;
 import org.apache.hadoop.hbase.regionserver.HRegionServer;
 import org.apache.hadoop.hbase.testclassification.MasterTests;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
@@ -58,7 +59,7 @@ public class TestMasterProcedureEvents {
 
   private static void setupConf(Configuration conf) {
     conf.setInt(MasterProcedureConstants.MASTER_PROCEDURE_THREADS, 8);
-    conf.setBoolean("hbase.procedure.store.wal.use.hsync", false);
+    conf.setBoolean(WALProcedureStore.USE_HSYNC_CONF_KEY, false);
   }
 
   @BeforeClass

http://git-wip-us.apache.org/repos/asf/hbase/blob/d500f6fd/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestWALProcedureStoreOnHDFS.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestWALProcedureStoreOnHDFS.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestWALProcedureStoreOnHDFS.java
index ecc7554..ea45cf6 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestWALProcedureStoreOnHDFS.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestWALProcedureStoreOnHDFS.java
@@ -88,9 +88,9 @@ public class TestWALProcedureStoreOnHDFS {
     conf.setInt("dfs.namenode.replication.min", 3);
 
     // increase the value for slow test-env
-    conf.setInt("hbase.procedure.store.wal.wait.before.roll", 1000);
-    conf.setInt("hbase.procedure.store.wal.max.roll.retries", 10);
-    conf.setInt("hbase.procedure.store.wal.sync.failure.roll.max", 10);
+    conf.setInt(WALProcedureStore.WAIT_BEFORE_ROLL_CONF_KEY, 1000);
+    conf.setInt(WALProcedureStore.ROLL_RETRIES_CONF_KEY, 10);
+    conf.setInt(WALProcedureStore.MAX_SYNC_FAILURE_ROLL_CONF_KEY, 10);
   }
 
   public void setup() throws Exception {


Mime
View raw message