@InterfaceAudience.Private public class DeleteTableProcedure extends AbstractStateMachineTableProcedure<MasterProcedureProtos.DeleteTableState>
StateMachineProcedure.FlowProcedure.LockStateTableProcedureInterface.TableOperationTypestateCountNO_PROC_ID, NO_TIMEOUT| Constructor and Description |
|---|
DeleteTableProcedure() |
DeleteTableProcedure(MasterProcedureEnv env,
TableName tableName) |
DeleteTableProcedure(MasterProcedureEnv env,
TableName tableName,
ProcedurePrepareLatch syncLatch) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
abort(MasterProcedureEnv env)
The abort() call is asynchronous and each procedure must decide how to deal
with it, if they want to be abortable.
|
protected static void |
deleteAssignmentState(MasterProcedureEnv env,
TableName tableName) |
protected static void |
deleteFromFs(MasterProcedureEnv env,
TableName tableName,
List<RegionInfo> regions,
boolean archive) |
protected static void |
deleteFromMeta(MasterProcedureEnv env,
TableName tableName,
List<RegionInfo> regions) |
protected static void |
deleteTableDescriptorCache(MasterProcedureEnv env,
TableName tableName) |
protected static void |
deleteTableStates(MasterProcedureEnv env,
TableName tableName) |
protected void |
deserializeStateData(ProcedureStateSerializer serializer)
Called on store load to allow the user to decode the previously serialized
state.
|
protected StateMachineProcedure.Flow |
executeFromState(MasterProcedureEnv env,
MasterProcedureProtos.DeleteTableState state)
called to perform a single step of the specified 'state' of the procedure
|
protected MasterProcedureProtos.DeleteTableState |
getInitialState()
Return the initial state object that will be used for the first call to executeFromState().
|
protected MasterProcedureProtos.DeleteTableState |
getState(int stateId)
Convert an ordinal (or state id) to an Enum (or more descriptive) state object.
|
protected int |
getStateId(MasterProcedureProtos.DeleteTableState state)
Convert the Enum (or more descriptive) state object to an ordinal (or state id).
|
TableName |
getTableName() |
TableProcedureInterface.TableOperationType |
getTableOperationType()
Given an operation type we can take decisions about what to do with pending operations.
|
protected boolean |
isRollbackSupported(MasterProcedureProtos.DeleteTableState state)
Used by the default implementation of abort() to know if the current state can be aborted
and rollback can be triggered.
|
protected void |
rollbackState(MasterProcedureEnv env,
MasterProcedureProtos.DeleteTableState state)
called to perform the rollback of the specified state
|
protected void |
serializeStateData(ProcedureStateSerializer serializer)
The user-level code of the procedure may have some state to
persist (e.g.
|
acquireLock, checkOnline, checkTableModifiable, getUser, getWALRegionDir, preflightChecks, releaseLock, releaseSyncLatch, setUser, toStringClassDetails, waitInitializedaddChildProcedure, execute, failIfAborted, getCurrentState, getCurrentStateId, getCycles, isEofState, isYieldAfterExecutionStep, isYieldBeforeExecuteFromState, rollback, setNextState, toStringStateaddStackIndex, afterReplay, beforeReplay, bypass, compareTo, completionCleanup, doExecute, doRollback, elapsedTime, getChildrenLatch, getException, getLastUpdate, getNonceKey, getOwner, getParentProcId, getProcedureMetrics, getProcId, getProcIdHashCode, getProcName, getResult, getRootProcedureId, getRootProcId, getStackIndexes, getState, getSubmittedTime, getTimeout, getTimeoutTimestamp, hasChildren, hasException, hasLock, hasOwner, hasParent, hasTimeout, haveSameParent, holdLock, incChildrenLatch, isBypass, isFailed, isFinished, isInitializing, isLockedWhenLoading, isRunnable, isSuccess, isWaiting, removeStackIndex, setAbortFailure, setChildrenLatch, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, setTimeoutFailure, shouldWaitClientAck, skipPersistence, toString, toStringClass, toStringDetails, toStringSimpleSB, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, wasExecutedpublic DeleteTableProcedure()
public DeleteTableProcedure(MasterProcedureEnv env, TableName tableName)
public DeleteTableProcedure(MasterProcedureEnv env, TableName tableName, ProcedurePrepareLatch syncLatch)
protected StateMachineProcedure.Flow executeFromState(MasterProcedureEnv env, MasterProcedureProtos.DeleteTableState state) throws InterruptedException
StateMachineProcedureexecuteFromState in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.DeleteTableState>state - state to executeInterruptedExceptionprotected boolean abort(MasterProcedureEnv env)
ProcedureNOTE: abort() is not like Thread.interrupt(). It is just a notification that allows the procedure implementor abort.
abort in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.DeleteTableState>protected void rollbackState(MasterProcedureEnv env, MasterProcedureProtos.DeleteTableState state)
StateMachineProcedurerollbackState in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.DeleteTableState>state - state to rollbackprotected boolean isRollbackSupported(MasterProcedureProtos.DeleteTableState state)
StateMachineProcedureisRollbackSupported in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.DeleteTableState>protected MasterProcedureProtos.DeleteTableState getState(int stateId)
StateMachineProceduregetState in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.DeleteTableState>stateId - the ordinal() of the state enum (or state id)protected int getStateId(MasterProcedureProtos.DeleteTableState state)
StateMachineProceduregetStateId in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.DeleteTableState>state - the state enum objectprotected MasterProcedureProtos.DeleteTableState getInitialState()
StateMachineProceduregetInitialState in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.DeleteTableState>public TableName getTableName()
getTableName in interface TableProcedureInterfacegetTableName in class AbstractStateMachineTableProcedure<MasterProcedureProtos.DeleteTableState>public TableProcedureInterface.TableOperationType getTableOperationType()
TableProcedureInterfacegetTableOperationType in interface TableProcedureInterfacegetTableOperationType in class AbstractStateMachineTableProcedure<MasterProcedureProtos.DeleteTableState>protected void serializeStateData(ProcedureStateSerializer serializer) throws IOException
ProcedureserializeStateData in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.DeleteTableState>serializer - stores the serializable stateIOExceptionprotected void deserializeStateData(ProcedureStateSerializer serializer) throws IOException
ProceduredeserializeStateData in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.DeleteTableState>serializer - contains the serialized stateIOExceptionprotected static void deleteFromFs(MasterProcedureEnv env, TableName tableName, List<RegionInfo> regions, boolean archive) throws IOException
IOExceptionprotected static void deleteFromMeta(MasterProcedureEnv env, TableName tableName, List<RegionInfo> regions) throws IOException
IOExceptionprotected static void deleteAssignmentState(MasterProcedureEnv env, TableName tableName) throws IOException
IOExceptionprotected static void deleteTableDescriptorCache(MasterProcedureEnv env, TableName tableName) throws IOException
IOExceptionprotected static void deleteTableStates(MasterProcedureEnv env, TableName tableName) throws IOException
IOExceptionCopyright © 2007–2019 Cloudera. All rights reserved.