ServerCrashProcedure
directly, and the initial work for meta table
will be done by InitMetaProcedure
.@Deprecated @InterfaceAudience.Private public class RecoverMetaProcedure extends StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState> implements MetaProcedureInterface
ServerCrashProcedure
,
InitMetaProcedure
StateMachineProcedure.Flow
Procedure.LockState
MetaProcedureInterface.MetaOperationType
Modifier and Type | Field and Description |
---|---|
private ServerName |
failedMetaServer
Deprecated.
|
private static org.slf4j.Logger |
LOG
Deprecated.
|
private MasterServices |
master
Deprecated.
|
private int |
replicaId
Deprecated.
|
private boolean |
shouldSplitWal
Deprecated.
|
private ProcedurePrepareLatch |
syncLatch
Deprecated.
|
stateCount
NO_PROC_ID, NO_TIMEOUT
Constructor and Description |
---|
RecoverMetaProcedure()
Deprecated.
This constructor is also used when deserializing from a procedure store; we'll construct one
of these then call #deserializeStateData(InputStream).
|
RecoverMetaProcedure(ServerName failedMetaServer,
boolean shouldSplitLog)
Deprecated.
Call this constructor to queue up a
RecoverMetaProcedure in response to meta
carrying server crash |
RecoverMetaProcedure(ServerName failedMetaServer,
boolean shouldSplitLog,
ProcedurePrepareLatch latch)
Deprecated.
Constructor with latch, for blocking/ sync usage
|
Modifier and Type | Method and Description |
---|---|
protected Procedure.LockState |
acquireLock(MasterProcedureEnv env)
Deprecated.
The user should override this method if they need a lock on an Entity.
|
protected void |
completionCleanup(MasterProcedureEnv env)
Deprecated.
Called when the procedure is marked as completed (success or rollback).
|
protected void |
deserializeStateData(ProcedureStateSerializer serializer)
Deprecated.
Called on store load to allow the user to decode the previously serialized
state.
|
protected StateMachineProcedure.Flow |
executeFromState(MasterProcedureEnv env,
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState state)
Deprecated.
called to perform a single step of the specified 'state' of the procedure
|
protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState |
getInitialState()
Deprecated.
Return the initial state object that will be used for the first call to executeFromState().
|
protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState |
getState(int stateId)
Deprecated.
Convert an ordinal (or state id) to an Enum (or more descriptive) state object.
|
protected int |
getStateId(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState recoverMetaState)
Deprecated.
Convert the Enum (or more descriptive) state object to an ordinal (or state id).
|
private void |
handleRIT(MasterProcedureEnv env,
RegionInfo ri,
ServerName crashedServerName)
Deprecated.
Is the region stuck assigning to this failedMetaServer? If so, cancel the call
just as we do over in ServerCrashProcedure#handleRIT except less to do here; less context
to carry.
|
private boolean |
isRunRequired()
Deprecated.
|
private void |
prepare(MasterProcedureEnv env)
Deprecated.
Prepare for execution
|
protected void |
releaseLock(MasterProcedureEnv env)
Deprecated.
The user should override this method, and release lock if necessary.
|
protected void |
rollbackState(MasterProcedureEnv env,
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState recoverMetaState)
Deprecated.
called to perform the rollback of the specified state
|
protected void |
serializeStateData(ProcedureStateSerializer serializer)
Deprecated.
The user-level code of the procedure may have some state to
persist (e.g.
|
protected void |
toStringClassDetails(StringBuilder sb)
Deprecated.
Extend the toString() information with the procedure details
e.g.
|
abort, addChildProcedure, execute, failIfAborted, getCurrentState, getCurrentStateId, getCycles, isEofState, isRollbackSupported, isYieldAfterExecutionStep, isYieldBeforeExecuteFromState, rollback, setNextState, toStringState
addStackIndex, afterReplay, beforeReplay, bypass, compareTo, 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, waitInitialized, wasExecuted
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMetaOperationType
private static final org.slf4j.Logger LOG
private ServerName failedMetaServer
private boolean shouldSplitWal
private int replicaId
private final ProcedurePrepareLatch syncLatch
private MasterServices master
public RecoverMetaProcedure(ServerName failedMetaServer, boolean shouldSplitLog)
RecoverMetaProcedure
in response to meta
carrying server crashfailedMetaServer
- failed/ crashed region server that was carrying metashouldSplitLog
- split log file of meta regionpublic RecoverMetaProcedure(ServerName failedMetaServer, boolean shouldSplitLog, ProcedurePrepareLatch latch)
public RecoverMetaProcedure()
protected StateMachineProcedure.Flow executeFromState(MasterProcedureEnv env, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState state) throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException
StateMachineProcedure
executeFromState
in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState>
state
- state to executeProcedureSuspendedException
ProcedureYieldException
InterruptedException
private void handleRIT(MasterProcedureEnv env, RegionInfo ri, ServerName crashedServerName)
protected void rollbackState(MasterProcedureEnv env, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState recoverMetaState) throws IOException, InterruptedException
StateMachineProcedure
rollbackState
in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState>
recoverMetaState
- state to rollbackIOException
- temporary failure, the rollback will retry laterInterruptedException
protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState getState(int stateId)
StateMachineProcedure
getState
in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState>
stateId
- the ordinal() of the state enum (or state id)protected int getStateId(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState recoverMetaState)
StateMachineProcedure
getStateId
in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState>
recoverMetaState
- the state enum objectprotected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState getInitialState()
StateMachineProcedure
getInitialState
in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState>
protected void toStringClassDetails(StringBuilder sb)
Procedure
toStringClassDetails
in class Procedure<MasterProcedureEnv>
sb
- the string builder to use to append the proc specific informationprotected void serializeStateData(ProcedureStateSerializer serializer) throws IOException
Procedure
serializeStateData
in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState>
serializer
- stores the serializable stateIOException
protected void deserializeStateData(ProcedureStateSerializer serializer) throws IOException
Procedure
deserializeStateData
in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RecoverMetaState>
serializer
- contains the serialized stateIOException
protected Procedure.LockState acquireLock(MasterProcedureEnv env)
Procedure
Procedure.execute(Object)
. It calls Procedure.releaseLock(Object)
after the call to
execute.
If you need to hold the lock for the life of the Procedure -- i.e. you do not want any other
Procedure interfering while this Procedure is running, see Procedure.holdLock(Object)
.
Example: in our Master we can execute request in parallel for different tables. We can create
t1 and create t2 and these creates can be executed at the same time. Anything else on t1/t2 is
queued waiting that specific table create to happen.
There are 3 LockState:
acquireLock
in class Procedure<MasterProcedureEnv>
protected void releaseLock(MasterProcedureEnv env)
Procedure
releaseLock
in class Procedure<MasterProcedureEnv>
protected void completionCleanup(MasterProcedureEnv env)
Procedure
completionCleanup
in class Procedure<MasterProcedureEnv>
private boolean isRunRequired()
private void prepare(MasterProcedureEnv env)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.