hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject svn commit: r1535605 - /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
Date Fri, 25 Oct 2013 01:44:18 GMT
Author: larsh
Date: Fri Oct 25 01:44:18 2013
New Revision: 1535605

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

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

Modified: hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java?rev=1535605&r1=1535604&r2=1535605&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
(original)
+++ hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
Fri Oct 25 01:44:18 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