hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject git commit: HBASE-12312 Another couple of createTable race conditions
Date Wed, 29 Oct 2014 05:36:54 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 80f83db0b -> a973fd514


HBASE-12312 Another couple of createTable race conditions

Signed-off-by: stack <stack@apache.org>


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

Branch: refs/heads/branch-1
Commit: a973fd514f153572182a822e6bf930b11be1a81d
Parents: 80f83db
Author: Dima Spivak <dspivak@cloudera.com>
Authored: Tue Oct 28 23:40:22 2014 +0000
Committer: stack <stack@apache.org>
Committed: Tue Oct 28 22:36:41 2014 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/replication/TestReplicationBase.java | 2 ++
 .../hadoop/hbase/security/access/TestAccessController.java       | 4 ++++
 .../hadoop/hbase/security/access/TestScanEarlyTermination.java   | 3 +--
 3 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/a973fd51/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationBase.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationBase.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationBase.java
index ea524a1..de46f25 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationBase.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationBase.java
@@ -141,7 +141,9 @@ public class TestReplicationBase {
     Admin admin1 = new HBaseAdmin(conf1);
     Admin admin2 = new HBaseAdmin(conf2);
     admin1.createTable(table, HBaseTestingUtility.KEYS_FOR_HBA_CREATE_TABLE);
+    utility1.waitUntilAllRegionsAssigned(tableName);
     admin2.createTable(table, HBaseTestingUtility.KEYS_FOR_HBA_CREATE_TABLE);
+    utility2.waitUntilAllRegionsAssigned(tableName);
     htable1 = new HTable(conf1, tableName);
     htable1.setWriteBufferSize(1024);
     htable2 = new HTable(conf2, tableName);

http://git-wip-us.apache.org/repos/asf/hbase/blob/a973fd51/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
index 9dde626..cf1c7bc 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
@@ -1049,6 +1049,7 @@ public class TestAccessController extends SecureTestUtil {
     htd.addFamily(new HColumnDescriptor(family1));
     htd.addFamily(new HColumnDescriptor(family2));
     admin.createTable(htd);
+    TEST_UTIL.waitUntilAllRegionsAssigned(tableName);
 
     // create temp users
     User tblUser = User
@@ -1323,6 +1324,7 @@ public class TestAccessController extends SecureTestUtil {
     htd.addFamily(new HColumnDescriptor(family1));
     htd.addFamily(new HColumnDescriptor(family2));
     admin.createTable(htd);
+    TEST_UTIL.waitUntilAllRegionsAssigned(tableName);
 
     // create temp users
     User user = User.createUserForTesting(TEST_UTIL.getConfiguration(), "user", new String[0]);
@@ -1438,6 +1440,7 @@ public class TestAccessController extends SecureTestUtil {
     htd.addFamily(new HColumnDescriptor(family2));
     htd.setOwner(USER_OWNER);
     admin.createTable(htd);
+    TEST_UTIL.waitUntilAllRegionsAssigned(tableName);
 
     List<UserPermission> perms;
 
@@ -1911,6 +1914,7 @@ public class TestAccessController extends SecureTestUtil {
     HTableDescriptor htd = new HTableDescriptor(TEST_TABLE2);
     htd.addFamily(new HColumnDescriptor(TEST_FAMILY));
     admin.createTable(htd);
+    TEST_UTIL.waitUntilAllRegionsAssigned(TEST_TABLE2);
 
     // Starting a new RegionServer.
     JVMClusterUtil.RegionServerThread newRsThread = hbaseCluster

http://git-wip-us.apache.org/repos/asf/hbase/blob/a973fd51/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestScanEarlyTermination.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestScanEarlyTermination.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestScanEarlyTermination.java
index 6d7ff61..af5ed89 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestScanEarlyTermination.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestScanEarlyTermination.java
@@ -127,8 +127,7 @@ public class TestScanEarlyTermination extends SecureTestUtil {
     htd.setConfiguration(AccessControlConstants.CF_ATTRIBUTE_EARLY_OUT, "true");
 
     admin.createTable(htd);
-
-    TEST_UTIL.waitTableEnabled(TEST_TABLE.getTableName());
+    TEST_UTIL.waitUntilAllRegionsAssigned(TEST_TABLE.getTableName());
   }
 
   @After


Mime
View raw message