@InterfaceAudience.Private public class AddPeerProcedure extends ModifyPeerProcedure
org.apache.hadoop.hbase.procedure2.StateMachineProcedure.Floworg.apache.hadoop.hbase.procedure2.Procedure.LockStatePeerProcedureInterface.PeerOperationTypeSLEEP_INTERVAL_MS, UPDATE_LAST_SEQ_ID_BATCH_SIZElatch, peerId| Constructor and Description |
|---|
AddPeerProcedure() |
AddPeerProcedure(String peerId,
org.apache.hadoop.hbase.replication.ReplicationPeerConfig peerConfig,
boolean enabled) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
deserializeStateData(org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer serializer) |
protected boolean |
enablePeerBeforeFinish()
The implementation class should override this method if the procedure may enter the serial
related states.
|
protected org.apache.hadoop.hbase.replication.ReplicationPeerConfig |
getNewPeerConfig() |
PeerProcedureInterface.PeerOperationType |
getPeerOperationType() |
protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.PeerModificationState |
nextStateAfterRefresh()
Implementation class can override this method.
|
protected void |
postPeerModification(MasterProcedureEnv env)
Called before we finish the procedure.
|
protected void |
prePeerModification(MasterProcedureEnv env)
Called before we start the actual processing.
|
protected void |
serializeStateData(org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer serializer) |
protected void |
updateLastPushedSequenceIdForSerialPeer(MasterProcedureEnv env) |
protected void |
updatePeerStorage(MasterProcedureEnv env) |
enablePeer, executeFromState, getInitialState, getOldPeerConfig, getState, getStateId, reopenRegions, rollbackState, setLastPushedSequenceId, setLastPushedSequenceIdForTable, setTimeoutFailureacquireLock, getLatch, getPeerId, holdLock, releaseLock, waitInitializedabort, 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, 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, wasExecutedpublic AddPeerProcedure()
public AddPeerProcedure(String peerId, org.apache.hadoop.hbase.replication.ReplicationPeerConfig peerConfig, boolean enabled)
public PeerProcedureInterface.PeerOperationType getPeerOperationType()
protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.PeerModificationState nextStateAfterRefresh()
ModifyPeerProcedurenextStateAfterRefresh in class ModifyPeerProcedureprotected void updateLastPushedSequenceIdForSerialPeer(MasterProcedureEnv env) throws IOException, org.apache.hadoop.hbase.replication.ReplicationException
updateLastPushedSequenceIdForSerialPeer in class ModifyPeerProcedureIOExceptionorg.apache.hadoop.hbase.replication.ReplicationExceptionprotected boolean enablePeerBeforeFinish()
ModifyPeerProcedureenablePeerBeforeFinish in class ModifyPeerProcedureprotected org.apache.hadoop.hbase.replication.ReplicationPeerConfig getNewPeerConfig()
getNewPeerConfig in class ModifyPeerProcedureprotected void prePeerModification(MasterProcedureEnv env) throws IOException, org.apache.hadoop.hbase.replication.ReplicationException
ModifyPeerProcedureIf 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.
prePeerModification in class ModifyPeerProcedureIOExceptionorg.apache.hadoop.hbase.replication.ReplicationExceptionprotected void updatePeerStorage(MasterProcedureEnv env) throws org.apache.hadoop.hbase.replication.ReplicationException
updatePeerStorage in class ModifyPeerProcedureorg.apache.hadoop.hbase.replication.ReplicationExceptionprotected void postPeerModification(MasterProcedureEnv env) throws IOException, org.apache.hadoop.hbase.replication.ReplicationException
ModifyPeerProcedure
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.
postPeerModification in class ModifyPeerProcedureIOExceptionorg.apache.hadoop.hbase.replication.ReplicationExceptionprotected void serializeStateData(org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer serializer)
throws IOException
serializeStateData in class AbstractPeerProcedure<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.PeerModificationState>IOExceptionprotected void deserializeStateData(org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer serializer)
throws IOException
deserializeStateData in class AbstractPeerProcedure<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.PeerModificationState>IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.