@InterfaceAudience.Private public abstract class ModifyPeerProcedure extends AbstractPeerProcedure<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.PeerModificationState>
StateMachineProcedure.FlowProcedure.LockStatePeerProcedureInterface.PeerOperationType| Modifier and Type | Field and Description |
|---|---|
protected static int |
SLEEP_INTERVAL_MS |
protected static int |
UPDATE_LAST_SEQ_ID_BATCH_SIZE |
latch, peerIdNO_PROC_ID, NO_TIMEOUT| Modifier | Constructor and Description |
|---|---|
protected |
ModifyPeerProcedure() |
protected |
ModifyPeerProcedure(String peerId) |
acquireLock, deserializeStateData, getLatch, getPeerId, holdLock, releaseLock, serializeStateData, waitInitializedabort, addChildProcedure, execute, failIfAborted, getCurrentState, getCurrentStateId, getCycles, isRollbackSupported, 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, 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, shouldWaitClientAck, skipPersistence, toString, toStringClass, toStringClassDetails, toStringDetails, toStringSimpleSB, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, wasExecutedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPeerOperationTypeprotected static final int UPDATE_LAST_SEQ_ID_BATCH_SIZE
protected static final int SLEEP_INTERVAL_MS
protected ModifyPeerProcedure()
protected ModifyPeerProcedure(String peerId)
protected abstract void prePeerModification(MasterProcedureEnv env) throws IOException, ReplicationException
If an IOException is thrown then we will give up and mark the procedure as failed directly. If all checks passes then the procedure can not be rolled back any more.
IOExceptionReplicationExceptionprotected abstract void updatePeerStorage(MasterProcedureEnv env) throws ReplicationException
ReplicationExceptionprotected abstract void postPeerModification(MasterProcedureEnv env) throws IOException, ReplicationException
Notice that, since we have already done the actual work, throwing IOException here will
not fail this procedure, we will just ignore it and finish the procedure as suceeded. If
ReplicationException is thrown we will retry since this usually means we fails to
update the peer storage.
IOExceptionReplicationExceptionprotected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.PeerModificationState nextStateAfterRefresh()
protected boolean enablePeerBeforeFinish()
protected ReplicationPeerConfig getOldPeerConfig()
protected ReplicationPeerConfig getNewPeerConfig()
protected void updateLastPushedSequenceIdForSerialPeer(MasterProcedureEnv env) throws IOException, ReplicationException
IOExceptionReplicationExceptionprotected void reopenRegions(MasterProcedureEnv env) throws IOException
IOExceptionprotected void enablePeer(MasterProcedureEnv env) throws ReplicationException
ReplicationExceptionprotected final void setLastPushedSequenceId(MasterProcedureEnv env, ReplicationPeerConfig peerConfig) throws IOException, ReplicationException
IOExceptionReplicationExceptionprotected final void setLastPushedSequenceIdForTable(MasterProcedureEnv env, TableName tableName, Map<String,Long> lastSeqIds) throws IOException, ReplicationException
IOExceptionReplicationExceptionprotected boolean setTimeoutFailure(MasterProcedureEnv env)
setTimeoutFailure in class Procedure<MasterProcedureEnv>protected StateMachineProcedure.Flow executeFromState(MasterProcedureEnv env, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.PeerModificationState state) throws ProcedureSuspendedException
protected void rollbackState(MasterProcedureEnv env, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.PeerModificationState state) throws IOException, InterruptedException
protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.PeerModificationState getState(int stateId)
protected int getStateId(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.PeerModificationState state)
protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.PeerModificationState getInitialState()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.