hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject svn commit: r1535604 - /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
Date Fri, 25 Oct 2013 01:43:50 GMT
Author: larsh
Date: Fri Oct 25 01:43:49 2013
New Revision: 1535604

URL: http://svn.apache.org/r1535604
Log:
HBASE-7600 TestAdmin.testCreateBadTables is failing occasionally (Liu Shaohui)

Modified:
    hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java

Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java?rev=1535604&r1=1535603&r2=1535604&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
(original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
Fri Oct 25 01:43:49 2013
@@ -147,7 +147,7 @@ public class ZKTable {
   public boolean checkAndSetEnablingTable(final TableName tableName)
     throws KeeperException {
     synchronized (this.cache) {
-      if (isEnablingTable(tableName)) {
+      if (isEnablingOrEnabledTable(tableName)) {
         return false;
       }
       setTableState(tableName, ZooKeeperProtos.Table.State.ENABLING);
@@ -228,6 +228,12 @@ public class ZKTable {
     }
   }
 
+  public boolean isEnablingOrEnabledTable(final TableName tableName) {
+    synchronized (this.cache) {
+      return isEnablingTable(tableName) || isEnabledTable(tableName);
+    }
+  }
+
   public boolean isEnabledOrDisablingTable(final TableName tableName) {
     synchronized (this.cache) {
       return isEnabledTable(tableName) || isDisablingTable(tableName);



Mime
View raw message