public class CreateTableProcedure extends AbstractStateMachineTableProcedure<CreateTableState>
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
CreateTableProcedure.CreateHdfsRegions |
TableProcedureInterface.TableOperationType| Constructor and Description |
|---|
CreateTableProcedure() |
CreateTableProcedure(MasterProcedureEnv env,
TableDescriptor tableDescriptor,
RegionInfo[] newRegions) |
CreateTableProcedure(MasterProcedureEnv env,
TableDescriptor tableDescriptor,
RegionInfo[] newRegions,
ProcedurePrepareLatch syncLatch) |
| Modifier and Type | Method and Description |
|---|---|
protected LockState |
acquireLock(MasterProcedureEnv env) |
protected static java.util.List<RegionInfo> |
addTableToMeta(MasterProcedureEnv env,
TableDescriptor tableDescriptor,
java.util.List<RegionInfo> regions) |
protected static java.util.List<RegionInfo> |
createFsLayout(MasterProcedureEnv env,
TableDescriptor tableDescriptor,
java.util.List<RegionInfo> newRegions) |
protected static java.util.List<RegionInfo> |
createFsLayout(MasterProcedureEnv env,
TableDescriptor tableDescriptor,
java.util.List<RegionInfo> newRegions,
CreateTableProcedure.CreateHdfsRegions hdfsRegionHandler) |
protected void |
deserializeStateData(ProcedureStateSerializer serializer) |
protected Flow |
executeFromState(MasterProcedureEnv env,
CreateTableState state) |
protected CreateTableState |
getInitialState() |
protected CreateTableState |
getState(int stateId) |
protected int |
getStateId(CreateTableState state) |
TableName |
getTableName() |
TableProcedureInterface.TableOperationType |
getTableOperationType()
Given an operation type we can take decisions about what to do with pending operations.
|
protected boolean |
isRollbackSupported(CreateTableState state) |
protected static void |
moveTempDirectoryToHBaseRoot(MasterProcedureEnv env,
TableDescriptor tableDescriptor,
Path tempTableDir) |
protected void |
rollbackState(MasterProcedureEnv env,
CreateTableState state) |
protected void |
serializeStateData(ProcedureStateSerializer serializer) |
protected static void |
setEnabledState(MasterProcedureEnv env,
TableName tableName) |
protected static void |
setEnablingState(MasterProcedureEnv env,
TableName tableName) |
protected boolean |
shouldWaitClientAck(MasterProcedureEnv env) |
protected static void |
updateTableDescCache(MasterProcedureEnv env,
TableName tableName) |
checkOnline, checkTableModifiable, getRegionDir, getUser, preflightChecks, releaseLock, releaseSyncLatch, setUser, toStringClassDetailspublic CreateTableProcedure()
public CreateTableProcedure(MasterProcedureEnv env, TableDescriptor tableDescriptor, RegionInfo[] newRegions)
public CreateTableProcedure(MasterProcedureEnv env, TableDescriptor tableDescriptor, RegionInfo[] newRegions, ProcedurePrepareLatch syncLatch)
protected Flow executeFromState(MasterProcedureEnv env, CreateTableState state) throws java.lang.InterruptedException
java.lang.InterruptedExceptionprotected void rollbackState(MasterProcedureEnv env, CreateTableState state) throws java.io.IOException
java.io.IOExceptionprotected boolean isRollbackSupported(CreateTableState state)
protected CreateTableState getState(int stateId)
protected int getStateId(CreateTableState state)
protected CreateTableState getInitialState()
public TableName getTableName()
getTableName in interface TableProcedureInterfacegetTableName in class AbstractStateMachineTableProcedure<CreateTableState>public TableProcedureInterface.TableOperationType getTableOperationType()
TableProcedureInterfacegetTableOperationType in interface TableProcedureInterfacegetTableOperationType in class AbstractStateMachineTableProcedure<CreateTableState>protected void serializeStateData(ProcedureStateSerializer serializer)
throws java.io.IOException
java.io.IOExceptionprotected void deserializeStateData(ProcedureStateSerializer serializer)
throws java.io.IOException
java.io.IOExceptionprotected LockState acquireLock(MasterProcedureEnv env)
acquireLock in class AbstractStateMachineTableProcedure<CreateTableState>protected static java.util.List<RegionInfo> createFsLayout(MasterProcedureEnv env, TableDescriptor tableDescriptor, java.util.List<RegionInfo> newRegions) throws java.io.IOException
java.io.IOExceptionprotected static java.util.List<RegionInfo> createFsLayout(MasterProcedureEnv env, TableDescriptor tableDescriptor, java.util.List<RegionInfo> newRegions, CreateTableProcedure.CreateHdfsRegions hdfsRegionHandler) throws java.io.IOException
java.io.IOExceptionprotected static void moveTempDirectoryToHBaseRoot(MasterProcedureEnv env, TableDescriptor tableDescriptor, Path tempTableDir) throws java.io.IOException
java.io.IOExceptionprotected static java.util.List<RegionInfo> addTableToMeta(MasterProcedureEnv env, TableDescriptor tableDescriptor, java.util.List<RegionInfo> regions) throws java.io.IOException
java.io.IOExceptionprotected static void setEnablingState(MasterProcedureEnv env, TableName tableName) throws java.io.IOException
java.io.IOExceptionprotected static void setEnabledState(MasterProcedureEnv env, TableName tableName) throws java.io.IOException
java.io.IOExceptionprotected static void updateTableDescCache(MasterProcedureEnv env, TableName tableName) throws java.io.IOException
java.io.IOExceptionprotected boolean shouldWaitClientAck(MasterProcedureEnv env)