@InterfaceAudience.Private public class ServerCrashProcedure extends StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.ServerCrashState> implements ServerProcedureInterface
The procedure flow varies dependent on whether meta is assigned and if we are to split logs.
We come in here after ServerManager has noticed a server has expired. Procedures queued on the rpc should have been notified about fail and should be concurrently getting themselves ready to assign elsewhere.
StateMachineProcedure.FlowProcedure.LockStateServerProcedureInterface.ServerOperationTypestateCountNO_PROC_ID, NO_TIMEOUT| Constructor and Description |
|---|
ServerCrashProcedure()
Used when deserializing from a procedure store; we'll construct one of these then call
#deserializeStateData(InputStream).
|
ServerCrashProcedure(MasterProcedureEnv env,
ServerName serverName,
boolean shouldSplitWal,
boolean carryingMeta)
Call this constructor queuing up a Procedure.
|
addChildProcedure, execute, failIfAborted, getCurrentState, getCurrentStateId, getCycles, isEofState, isRollbackSupported, isYieldAfterExecutionStep, isYieldBeforeExecuteFromState, rollback, setNextState, toStringStateaddStackIndex, afterReplay, beforeReplay, bypass, compareTo, completionCleanup, doExecute, doRollback, elapsedTime, getChildrenLatch, getException, getLastUpdate, getNonceKey, getOwner, getParentProcId, getProcId, getProcIdHashCode, getProcName, getResult, getRootProcedureId, getRootProcId, getStackIndexes, getState, getSubmittedTime, getTimeout, getTimeoutTimestamp, hasChildren, hasException, hasLock, hasOwner, hasParent, hasTimeout, haveSameParent, 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, skipPersistence, toString, toStringClass, toStringDetails, toStringSimpleSB, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, waitInitialized, wasExecutedpublic ServerCrashProcedure(MasterProcedureEnv env, ServerName serverName, boolean shouldSplitWal, boolean carryingMeta)
serverName - Name of the crashed server.shouldSplitWal - True if we should split WALs as part of crashed server processing.carryingMeta - True if carrying hbase:meta table region.public ServerCrashProcedure()
public boolean isInRecoverMetaState()
protected StateMachineProcedure.Flow executeFromState(MasterProcedureEnv env, MasterProcedureProtos.ServerCrashState state) throws ProcedureSuspendedException, ProcedureYieldException
executeFromState in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.ServerCrashState>ProcedureSuspendedExceptionProcedureYieldExceptionprotected void rollbackState(MasterProcedureEnv env, MasterProcedureProtos.ServerCrashState state) throws IOException
rollbackState in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.ServerCrashState>IOExceptionprotected MasterProcedureProtos.ServerCrashState getState(int stateId)
getState in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.ServerCrashState>protected int getStateId(MasterProcedureProtos.ServerCrashState state)
getStateId in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.ServerCrashState>protected MasterProcedureProtos.ServerCrashState getInitialState()
getInitialState in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.ServerCrashState>protected boolean abort(MasterProcedureEnv env)
abort in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.ServerCrashState>protected Procedure.LockState acquireLock(MasterProcedureEnv env)
acquireLock in class Procedure<MasterProcedureEnv>protected void releaseLock(MasterProcedureEnv env)
releaseLock in class Procedure<MasterProcedureEnv>public void toStringClassDetails(StringBuilder sb)
toStringClassDetails in class Procedure<MasterProcedureEnv>protected void serializeStateData(ProcedureStateSerializer serializer) throws IOException
serializeStateData in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.ServerCrashState>IOExceptionprotected void deserializeStateData(ProcedureStateSerializer serializer) throws IOException
deserializeStateData in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.ServerCrashState>IOExceptionpublic ServerName getServerName()
getServerName in interface ServerProcedureInterfacepublic boolean hasMetaTableRegion()
hasMetaTableRegion in interface ServerProcedureInterfacepublic ServerProcedureInterface.ServerOperationType getServerOperationType()
ServerProcedureInterfacegetServerOperationType in interface ServerProcedureInterfaceprotected boolean shouldWaitClientAck(MasterProcedureEnv env)
shouldWaitClientAck in class Procedure<MasterProcedureEnv>protected ProcedureMetrics getProcedureMetrics(MasterProcedureEnv env)
getProcedureMetrics in class Procedure<MasterProcedureEnv>protected boolean holdLock(MasterProcedureEnv env)
holdLock in class Procedure<MasterProcedureEnv>public static void updateProgress(MasterProcedureEnv env, long parentId)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.