hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject hbase git commit: HBASE-16519 Procedure v2 - Avoid sync wait on DDLs operation (addendum)
Date Wed, 31 Aug 2016 20:52:54 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 5376106d0 -> 847955427


HBASE-16519 Procedure v2 - Avoid sync wait on DDLs operation (addendum)


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

Branch: refs/heads/master
Commit: 847955427528bb9edff44fb6b2969fc9dfd8b9cc
Parents: 5376106
Author: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Authored: Wed Aug 31 13:48:02 2016 -0700
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Wed Aug 31 13:48:25 2016 -0700

----------------------------------------------------------------------
 .../hbase/master/TestAssignmentManagerMetrics.java | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/84795542/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManagerMetrics.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManagerMetrics.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManagerMetrics.java
index 4817457..31e3af8 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManagerMetrics.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManagerMetrics.java
@@ -17,6 +17,8 @@
  */
 package org.apache.hadoop.hbase.master;
 
+import java.io.IOException;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -37,6 +39,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import static org.junit.Assert.fail;
 
 @Category(MediumTests.class)
 public class TestAssignmentManagerMetrics {
@@ -69,6 +72,11 @@ public class TestAssignmentManagerMetrics {
     // set tablesOnMaster to none
     conf.set("hbase.balancer.tablesOnMaster", "none");
 
+    // set client sync wait timeout to 5sec
+    conf.setInt("hbase.client.sync.wait.timeout.msec", 2500);
+    conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 1);
+    conf.setInt(HConstants.HBASE_CLIENT_OPERATION_TIMEOUT, 2500);
+
     TEST_UTIL.startMiniCluster(1);
     cluster = TEST_UTIL.getHBaseCluster();
     master = cluster.getMaster();
@@ -119,7 +127,14 @@ public class TestAssignmentManagerMetrics {
       String spec = "hdfs:///foo.jar|com.foo.FooRegionObserver|1001|arg1=1,arg2=2";
       htd.addCoprocessorWithSpec(spec);
 
-      TEST_UTIL.getHBaseAdmin().modifyTable(TABLENAME, htd);
+      try {
+        TEST_UTIL.getHBaseAdmin().modifyTable(TABLENAME, htd);
+        fail("Expected region failed to open");
+      } catch (IOException e) {
+        // expected, the RS will crash and the assignment will spin forever waiting for a
RS
+        // to assign the region. the region will not go to FAILED_OPEN because in this case
+        // we have just one RS and it will do one retry.
+      }
 
       // Sleep 3 seconds, wait for doMetrics chore catching up
       Thread.sleep(msgInterval * 3);


Mime
View raw message