@InterfaceAudience.Private public class ZKTableStateClientSideReader extends Object
Modifier | Constructor and Description |
---|---|
private |
ZKTableStateClientSideReader() |
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.
|
private static Set<TableName> |
getTablesInStates(ZooKeeperWatcher zkw,
org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State... states)
Gets a list of tables that are set as one of the passing in states in zookeeper.
|
(package private) static org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State |
getTableState(ZooKeeperWatcher zkw,
TableName tableName) |
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 . |
(package private) static boolean |
isTableState(org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State expectedState,
org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State currentState) |
public static boolean isDisabledTable(ZooKeeperWatcher zkw, TableName tableName) throws org.apache.zookeeper.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 checkingorg.apache.zookeeper.KeeperException
InterruptedException
public static boolean isEnabledTable(ZooKeeperWatcher zkw, TableName tableName) throws org.apache.zookeeper.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 checkingorg.apache.zookeeper.KeeperException
InterruptedException
public static boolean isDisablingOrDisabledTable(ZooKeeperWatcher zkw, TableName tableName) throws org.apache.zookeeper.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 checkingorg.apache.zookeeper.KeeperException
InterruptedException
public static Set<TableName> getDisabledTables(ZooKeeperWatcher zkw) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static Set<TableName> getDisabledOrDisablingTables(ZooKeeperWatcher zkw) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static Set<TableName> getEnablingTables(ZooKeeperWatcher zkw) throws org.apache.zookeeper.KeeperException, InterruptedException
zkw
- ZooKeeperWatcher instance to useorg.apache.zookeeper.KeeperException
InterruptedException
private static Set<TableName> getTablesInStates(ZooKeeperWatcher zkw, org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State... states) throws org.apache.zookeeper.KeeperException, InterruptedException
zkw
- ZooKeeperWatcher instance to usestates
- the list of states that a table could be inorg.apache.zookeeper.KeeperException
InterruptedException
static boolean isTableState(org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State expectedState, org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State currentState)
static org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State getTableState(ZooKeeperWatcher zkw, TableName tableName) throws org.apache.zookeeper.KeeperException, InterruptedException
zkw
- ZooKeeperWatcher instance to usetableName
- table we're checkingZooKeeperProtos.Table.State
found in znode.org.apache.zookeeper.KeeperException
InterruptedException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.