@InterfaceAudience.Private public class ZKTableStateClientSideReader extends Object
Modifier and Type | Method and Description |
---|---|
static Set<TableName> |
getDisabledOrDisablingTables(ZooKeeperWatcher zkw)
Gets a list of all the tables set as disabled in zookeeper.
|
static Set<TableName> |
getDisabledTables(ZooKeeperWatcher zkw)
Gets a list of all the tables set as disabled in zookeeper.
|
static Set<TableName> |
getEnablingTables(ZooKeeperWatcher zkw)
Gets a list of all the tables set as enabling in zookeeper.
|
static boolean |
isDisabledTable(ZooKeeperWatcher zkw,
TableName tableName)
Go to zookeeper and see if state of table is
ZooKeeperProtos.Table.State#DISABLED . |
static boolean |
isDisablingOrDisabledTable(ZooKeeperWatcher zkw,
TableName tableName)
Go to zookeeper and see if state of table is
ZooKeeperProtos.Table.State#DISABLING
of ZooKeeperProtos.Table.State#DISABLED . |
static boolean |
isEnabledTable(ZooKeeperWatcher zkw,
TableName tableName)
Go to zookeeper and see if state of table is
ZooKeeperProtos.Table.State#ENABLED . |
public static boolean isDisabledTable(ZooKeeperWatcher zkw, TableName tableName) throws KeeperException, InterruptedException
ZooKeeperProtos.Table.State#DISABLED
.
This method does not use cache.
This method is for clients other than AssignmentManagerzkw
- ZooKeeperWatcher instance to usetableName
- table we're checkingKeeperException
InterruptedException
public static boolean isEnabledTable(ZooKeeperWatcher zkw, TableName tableName) throws KeeperException, InterruptedException
ZooKeeperProtos.Table.State#ENABLED
.
This method does not use cache.
This method is for clients other than AssignmentManagerzkw
- ZooKeeperWatcher instance to usetableName
- table we're checkingKeeperException
InterruptedException
public static boolean isDisablingOrDisabledTable(ZooKeeperWatcher zkw, TableName tableName) throws KeeperException, InterruptedException
ZooKeeperProtos.Table.State#DISABLING
of ZooKeeperProtos.Table.State#DISABLED
.
This method does not use cache.
This method is for clients other than AssignmentManager.zkw
- ZooKeeperWatcher instance to usetableName
- table we're checkingKeeperException
InterruptedException
public static Set<TableName> getDisabledTables(ZooKeeperWatcher zkw) throws KeeperException, InterruptedException
KeeperException
InterruptedException
public static Set<TableName> getDisabledOrDisablingTables(ZooKeeperWatcher zkw) throws KeeperException, InterruptedException
KeeperException
InterruptedException
public static Set<TableName> getEnablingTables(ZooKeeperWatcher zkw) throws KeeperException, InterruptedException
zkw
- ZooKeeperWatcher instance to useKeeperException
InterruptedException