@InterfaceAudience.Private public interface TableStateManager
ZKTableStateClientSideReader
Modifier and Type | Method and Description |
---|---|
void |
checkAndRemoveTableState(TableName tableName,
ZooKeeperProtos.Table.State states,
boolean deletePermanentState)
If the table is found in the given state the in-memory state is removed.
|
Set<TableName> |
getTablesInStates(ZooKeeperProtos.Table.State... states) |
boolean |
isTablePresent(TableName tableName)
Checks if table is present.
|
boolean |
isTableState(TableName tableName,
boolean checkSource,
ZooKeeperProtos.Table.State... states) |
boolean |
isTableState(TableName tableName,
ZooKeeperProtos.Table.State... states) |
void |
setDeletedTable(TableName tableName)
Mark table as deleted.
|
void |
setTableState(TableName tableName,
ZooKeeperProtos.Table.State state)
Sets the table into desired state.
|
boolean |
setTableStateIfInStates(TableName tableName,
ZooKeeperProtos.Table.State newState,
ZooKeeperProtos.Table.State... states)
Sets the specified table into the newState, but only if the table is already in
one of the possibleCurrentStates (otherwise no operation is performed).
|
boolean |
setTableStateIfNotInStates(TableName tableName,
ZooKeeperProtos.Table.State newState,
ZooKeeperProtos.Table.State... states)
Sets the specified table into the newState, but only if the table is NOT in
one of the possibleCurrentStates (otherwise no operation is performed).
|
void setTableState(TableName tableName, ZooKeeperProtos.Table.State state) throws CoordinatedStateException
tableName
- table to processstate
- new state of this tableCoordinatedStateException
- if error happened when trying to set table stateboolean setTableStateIfInStates(TableName tableName, ZooKeeperProtos.Table.State newState, ZooKeeperProtos.Table.State... states) throws CoordinatedStateException
tableName
- 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 operationboolean setTableStateIfNotInStates(TableName tableName, ZooKeeperProtos.Table.State newState, ZooKeeperProtos.Table.State... states) throws CoordinatedStateException
tableName
- 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 operationboolean isTableState(TableName tableName, ZooKeeperProtos.Table.State... states)
boolean isTableState(TableName tableName, boolean checkSource, ZooKeeperProtos.Table.State... states)
void setDeletedTable(TableName tableName) throws CoordinatedStateException
tableName
- table to be deletedCoordinatedStateException
- if error happened while performing operationboolean isTablePresent(TableName tableName)
tableName
- table we're checkingSet<TableName> getTablesInStates(ZooKeeperProtos.Table.State... states) throws InterruptedIOException, CoordinatedStateException
InterruptedIOException
CoordinatedStateException
void checkAndRemoveTableState(TableName tableName, ZooKeeperProtos.Table.State states, boolean deletePermanentState) throws CoordinatedStateException
tableName
- 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 engine