You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2013/10/25 03:44:18 UTC
svn commit: r1535605 -
/hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
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);