public class MoveRegionProcedure extends AbstractStateMachineRegionProcedure<MoveRegionState>
Throws exception on construction if determines context hostile to move (cluster going down or master is shutting down or table is disabled).
TableProcedureInterface.TableOperationType| Constructor and Description |
|---|
MoveRegionProcedure() |
MoveRegionProcedure(MasterProcedureEnv env,
RegionPlan plan,
boolean check) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort(MasterProcedureEnv env) |
protected void |
deserializeStateData(ProcedureStateSerializer serializer) |
protected Flow |
executeFromState(MasterProcedureEnv env,
MoveRegionState state) |
protected MoveRegionState |
getInitialState() |
protected MoveRegionState |
getState(int stateId) |
protected int |
getStateId(MoveRegionState state) |
TableName |
getTableName() |
TableProcedureInterface.TableOperationType |
getTableOperationType()
Given an operation type we can take decisions about what to do with pending operations.
|
protected void |
rollbackState(MasterProcedureEnv env,
MoveRegionState state) |
protected void |
serializeStateData(ProcedureStateSerializer serializer) |
void |
toStringClassDetails(java.lang.StringBuilder sb) |
acquireLock, checkTableModifiable, getRegion, hasLock, holdLock, releaseLock, setFailure, setRegioncheckOnline, getRegionDir, getUser, preflightChecks, releaseSyncLatch, setUserpublic MoveRegionProcedure()
public MoveRegionProcedure(MasterProcedureEnv env, RegionPlan plan, boolean check) throws HBaseIOException
check - whether we should do some checks in the constructor. We will skip the checks if we
are reopening a region as this may fail the whole procedure and cause stuck. We will
do the check later when actually executing the procedure so not a big problem.java.io.IOException - If the cluster is offline or master is stopping or if table is disabled or
non-existent.HBaseIOExceptionprotected Flow executeFromState(MasterProcedureEnv env, MoveRegionState state) throws java.lang.InterruptedException
java.lang.InterruptedExceptionprotected void rollbackState(MasterProcedureEnv env, MoveRegionState state) throws java.io.IOException
java.io.IOExceptionpublic boolean abort(MasterProcedureEnv env)
public void toStringClassDetails(java.lang.StringBuilder sb)
toStringClassDetails in class AbstractStateMachineRegionProcedure<MoveRegionState>protected MoveRegionState getInitialState()
protected int getStateId(MoveRegionState state)
protected MoveRegionState getState(int stateId)
public TableName getTableName()
getTableName in interface TableProcedureInterfacegetTableName in class AbstractStateMachineRegionProcedure<MoveRegionState>public TableProcedureInterface.TableOperationType getTableOperationType()
TableProcedureInterfacegetTableOperationType in interface TableProcedureInterfacegetTableOperationType in class AbstractStateMachineRegionProcedure<MoveRegionState>protected void serializeStateData(ProcedureStateSerializer serializer)
throws java.io.IOException
serializeStateData in class AbstractStateMachineRegionProcedure<MoveRegionState>java.io.IOExceptionprotected void deserializeStateData(ProcedureStateSerializer serializer)
throws java.io.IOException
deserializeStateData in class AbstractStateMachineRegionProcedure<MoveRegionState>java.io.IOException