|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.zookeeper.ZKTable
@InterfaceAudience.Private public class ZKTable
Helper class for table state tracking for use by AssignmentManager.
Reads, caches and sets state up in zookeeper. If multiple read/write
clients, will make for confusion. Read-only clients other than
AssignmentManager interested in learning table state can use the
read-only utility methods in ZKTableReadOnly
.
To save on trips to the zookeeper ensemble, internally we cache table state.
Constructor Summary | |
---|---|
ZKTable(ZooKeeperWatcher zkw)
|
Method Summary | |
---|---|
boolean |
checkAndSetEnablingTable(String tableName)
Sets the specified table as ENABLING in zookeeper atomically If the table is already in ENABLING state, no operation is performed |
boolean |
checkDisabledAndSetEnablingTable(String tableName)
Sets the specified table as ENABLING in zookeeper atomically If the table isn't in DISABLED state, no operation is performed |
boolean |
checkEnabledAndSetDisablingTable(String tableName)
Sets the specified table as DISABLING in zookeeper atomically If the table isn't in ENABLED state, no operation is performed |
static Set<String> |
getDisabledOrDisablingTables(ZooKeeperWatcher zkw)
Gets a list of all the tables set as disabled in zookeeper. |
Set<String> |
getDisabledTables()
Gets a list of all the tables set as disabled in zookeeper. |
static Set<String> |
getDisabledTables(ZooKeeperWatcher zkw)
Gets a list of all the tables set as disabled in zookeeper. |
static Set<String> |
getDisablingTables(ZooKeeperWatcher zkw)
Gets a list of all the tables set as disabling in zookeeper. |
static Set<String> |
getEnablingTables(ZooKeeperWatcher zkw)
Gets a list of all the tables set as enabling in zookeeper. |
boolean |
isDisabledOrEnablingTable(String tableName)
|
boolean |
isDisabledTable(String tableName)
|
boolean |
isDisablingOrDisabledTable(String tableName)
|
boolean |
isDisablingTable(String tableName)
|
boolean |
isEnabledOrDisablingTable(String tableName)
|
boolean |
isEnabledTable(String tableName)
|
boolean |
isEnablingTable(String tableName)
|
boolean |
isTablePresent(String tableName)
check if table is present . |
void |
removeEnablingTable(String tableName)
If the table is found in ENABLING state the inmemory state is removed. |
void |
setDeletedTable(String tableName)
Deletes the table in zookeeper. |
void |
setDisabledTable(String tableName)
Sets the specified table as DISABLED in zookeeper. |
void |
setDisablingTable(String tableName)
Sets the specified table as DISABLING in zookeeper. |
void |
setEnabledTable(String tableName)
Sets the ENABLED state in the cache and creates or force updates a node to ENABLED state for the specified table |
void |
setEnablingTable(String tableName)
Sets the specified table as ENABLING in zookeeper. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ZKTable(ZooKeeperWatcher zkw) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
Method Detail |
---|
public void setDisabledTable(String tableName) throws org.apache.zookeeper.KeeperException
tableName
-
org.apache.zookeeper.KeeperException
- unexpected zookeeper exceptionpublic void setDisablingTable(String tableName) throws org.apache.zookeeper.KeeperException
tableName
-
org.apache.zookeeper.KeeperException
- unexpected zookeeper exceptionpublic void setEnablingTable(String tableName) throws org.apache.zookeeper.KeeperException
tableName
-
org.apache.zookeeper.KeeperException
- unexpected zookeeper exceptionpublic boolean checkAndSetEnablingTable(String tableName) throws org.apache.zookeeper.KeeperException
tableName
-
org.apache.zookeeper.KeeperException
- unexpected zookeeper exceptionpublic boolean checkDisabledAndSetEnablingTable(String tableName) throws org.apache.zookeeper.KeeperException
tableName
-
org.apache.zookeeper.KeeperException
- unexpected zookeeper exceptionpublic boolean checkEnabledAndSetDisablingTable(String tableName) throws org.apache.zookeeper.KeeperException
tableName
-
org.apache.zookeeper.KeeperException
- unexpected zookeeper exceptionpublic boolean isDisabledTable(String tableName)
public boolean isDisablingTable(String tableName)
public boolean isEnablingTable(String tableName)
public boolean isEnabledTable(String tableName)
public boolean isDisablingOrDisabledTable(String tableName)
public boolean isEnabledOrDisablingTable(String tableName)
public boolean isDisabledOrEnablingTable(String tableName)
public void setDeletedTable(String tableName) throws org.apache.zookeeper.KeeperException
tableName
-
org.apache.zookeeper.KeeperException
- unexpected zookeeper exceptionpublic void setEnabledTable(String tableName) throws org.apache.zookeeper.KeeperException
tableName
-
org.apache.zookeeper.KeeperException
public boolean isTablePresent(String tableName)
tableName
-
public Set<String> getDisabledTables()
public static Set<String> getDisabledTables(ZooKeeperWatcher zkw) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
public static Set<String> getDisablingTables(ZooKeeperWatcher zkw) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
public static Set<String> getEnablingTables(ZooKeeperWatcher zkw) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
public static Set<String> getDisabledOrDisablingTables(ZooKeeperWatcher zkw) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
public void removeEnablingTable(String tableName)
tableName
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |