HBASE-7600 TestAdmin.testCreateBadTables is failing occasionally (Liu Shaohui)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1535604 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5212bba403
commit
689014f2e5
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue