@InterfaceAudience.Private public class ZKTableStateManager extends Object implements TableStateManager
ZKTableStateClientSideReader instead.
To save on trips to the zookeeper ensemble, internally we cache table state.
| 构造器和说明 |
|---|
ZKTableStateManager(ZooKeeperWatcher zkw) |
public ZKTableStateManager(ZooKeeperWatcher zkw) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void setTableState(TableName tableName, org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State state) throws CoordinatedStateException
setTableState 在接口中 TableStateManagertableName - table to processstate - new state of this tableCoordinatedStateException - if error happened when trying to set table statepublic boolean setTableStateIfInStates(TableName tableName, org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State newState, org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State... states) throws CoordinatedStateException
setTableStateIfInStates 在接口中 TableStateManagertableName - table to processnewState - new state for the tablestates - table should be in one of these states for the operation
to be performedCoordinatedStateException - if error happened while performing operationpublic boolean setTableStateIfNotInStates(TableName tableName, org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State newState, org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State... states) throws CoordinatedStateException
setTableStateIfNotInStates 在接口中 TableStateManagertableName - table to processnewState - new state for the tablestates - table should NOT be in one of these states for the operation
to be performedCoordinatedStateException - if error happened while performing operationpublic boolean isTableState(TableName tableName, org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State... states)
isTableState 在接口中 TableStateManagerpublic boolean isTableState(TableName tableName, boolean checkSource, org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State... states)
isTableState 在接口中 TableStateManagerpublic void setDeletedTable(TableName tableName) throws CoordinatedStateException
setDeletedTable 在接口中 TableStateManagertableName - table to be deletedCoordinatedStateException - if error happened while performing operationpublic boolean isTablePresent(TableName tableName)
isTablePresent 在接口中 TableStateManagertableName - table we're working onpublic Set<TableName> getTablesInStates(org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State... states) throws InterruptedIOException, CoordinatedStateException
getTablesInStates 在接口中 TableStateManagerCoordinatedStateException - if error happened in underlying coordination engineInterruptedIOExceptionpublic void checkAndRemoveTableState(TableName tableName, org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.Table.State states, boolean deletePermanentState) throws CoordinatedStateException
checkAndRemoveTableState 在接口中 TableStateManagertableName - table we're working onstates - if table isn't in any one of these states, operation abortsdeletePermanentState - if true, reset the permanent flagCoordinatedStateException - if error happened in underlying coordination engineCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.