public class TableStateManager
extends java.lang.Object
start() is called.
TODO: Cache state. Cut down on meta looksups.| Modifier and Type | Class and Description |
|---|---|
static class |
TableStateManager.TableStateNotFoundException |
| Constructor and Description |
|---|
TableStateManager(MasterServices master) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
deleteZooKeeper(TableName tableName)
Deprecated.
Since 2.0.0. To be removed in hbase-3.0.0.
|
protected void |
fixTableState(TableState tableState)
For subclasses in case they want to do fixup post hbase:meta.
|
java.util.Set<TableName> |
getTablesInStates(TableState.State... states)
Return all tables in given states.
|
TableState |
getTableState(TableName tableName) |
boolean |
isTablePresent(TableName tableName) |
boolean |
isTableState(TableName tableName,
TableState.State... states) |
protected TableState |
readMetaState(TableName tableName) |
void |
setDeletedTable(TableName tableName) |
void |
setTableState(TableName tableName,
TableState.State newState)
Set table state to provided.
|
TableState |
setTableStateIfInStates(TableName tableName,
TableState.State newState,
TableState.State... states)
Set table state to provided but only if table in specified states
Caller should lock table on write.
|
boolean |
setTableStateIfNotInStates(TableName tableName,
TableState.State newState,
TableState.State... states)
Set table state to provided but only if table not in specified states
Caller should lock table on write.
|
void |
start() |
protected void |
updateMetaState(TableName tableName,
TableState.State newState) |
public TableStateManager(MasterServices master)
public void setTableState(TableName tableName,
TableState.State newState)
throws java.io.IOException
tableName - table to change state fornewState - new statejava.io.IOExceptionpublic TableState setTableStateIfInStates(TableName tableName,
TableState.State newState,
TableState.State... states)
throws java.io.IOException
tableName - table to change state fornewState - new statestates - states to check againstjava.io.IOExceptionpublic boolean setTableStateIfNotInStates(TableName tableName,
TableState.State newState,
TableState.State... states)
throws java.io.IOException
tableName - table to change state fornewState - new statestates - states to check againstjava.io.IOExceptionpublic boolean isTableState(TableName tableName,
TableState.State... states)
public void setDeletedTable(TableName tableName)
throws java.io.IOException
java.io.IOExceptionpublic boolean isTablePresent(TableName tableName)
throws java.io.IOException
java.io.IOExceptionpublic java.util.Set<TableName> getTablesInStates(TableState.State... states)
throws java.io.IOException
states - filter by statesjava.io.IOExceptionpublic TableState getTableState(TableName tableName)
throws java.io.IOException
java.io.IOExceptionprotected void updateMetaState(TableName tableName,
TableState.State newState)
throws java.io.IOException
java.io.IOExceptionprotected TableState readMetaState(TableName tableName)
throws java.io.IOException
java.io.IOExceptionpublic void start()
throws java.io.IOException
java.io.IOExceptionprotected void fixTableState(TableState tableState)
throws java.io.IOException
java.io.IOException@Deprecated protected void deleteZooKeeper(TableName tableName)