Class ServerRemoteProcedure
java.lang.Object
org.apache.hadoop.hbase.procedure2.Procedure<MasterProcedureEnv>
org.apache.hadoop.hbase.master.procedure.ServerRemoteProcedure
- All Implemented Interfaces:
Comparable<Procedure<MasterProcedureEnv>>
,RemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,
ServerName>
- Direct Known Subclasses:
ClaimReplicationQueueRemoteProcedure
,RefreshPeerProcedure
,SnapshotVerifyProcedure
,SplitWALRemoteProcedure
,SwitchRpcThrottleRemoteProcedure
@Private
public abstract class ServerRemoteProcedure
extends Procedure<MasterProcedureEnv>
implements RemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.procedure2.Procedure
Procedure.LockState
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected ProcedureEvent<?>
protected static final org.slf4j.Logger
protected boolean
protected ServerName
Fields inherited from class org.apache.hadoop.hbase.procedure2.Procedure
NO_PROC_ID, NO_TIMEOUT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
complete
(MasterProcedureEnv env, Throwable error) protected void
Called when the procedure is marked as completed (success or rollback).protected Procedure<MasterProcedureEnv>[]
The main code of the procedure.void
remoteCallFailed
(MasterProcedureEnv env, ServerName serverName, IOException exception) Called when the executeProcedure call is failed.void
Called when RS tells the remote procedure is succeeded through thereportProcedureDone
method.(package private) void
remoteOperationDone
(MasterProcedureEnv env, Throwable error) void
Called when RS tells the remote procedure is failed through thereportProcedureDone
method.Methods inherited from class org.apache.hadoop.hbase.procedure2.Procedure
abort, acquireLock, addStackIndex, afterReplay, beforeReplay, bypass, compareTo, deserializeStateData, 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, isRollbackSupported, isRunnable, isSuccess, isWaiting, isYieldAfterExecutionStep, releaseLock, removeStackIndex, rollback, serializeStateData, setAbortFailure, setChildrenLatch, setExecuted, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, setTimeoutFailure, shouldWaitClientAck, skipPersistence, suspend, toString, toStringClass, toStringClassDetails, toStringDetails, toStringSimpleSB, toStringState, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, waitInitialized, wasExecuted
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher.RemoteProcedure
remoteCallBuild, storeInDispatchedQueue
-
Field Details
-
LOG
-
event
-
targetServer
-
dispatched
-
succ
-
-
Constructor Details
-
ServerRemoteProcedure
public ServerRemoteProcedure()
-
-
Method Details
-
complete
-
execute
protected Procedure<MasterProcedureEnv>[] execute(MasterProcedureEnv env) throws ProcedureYieldException, ProcedureSuspendedException, InterruptedException Description copied from class:Procedure
The main code of the procedure. It must be idempotent since execute() may be called multiple times in case of machine failure in the middle of the execution.- Specified by:
execute
in classProcedure<MasterProcedureEnv>
- Parameters:
env
- the environment passed to the ProcedureExecutor- Returns:
- a set of sub-procedures to run or ourselves if there is more work to do or null if the procedure is done.
- Throws:
ProcedureYieldException
- the procedure will be added back to the queue and retried later.ProcedureSuspendedException
- Signal to the executor that Procedure has suspended itself and has set itself up waiting for an external event to wake it back up again.InterruptedException
- the procedure will be added back to the queue and retried later.
-
completionCleanup
Description copied from class:Procedure
Called when the procedure is marked as completed (success or rollback). The procedure implementor may use this method to cleanup in-memory states. This operation will not be retried on failure. If a procedure took a lock, it will have been released when this method runs.- Overrides:
completionCleanup
in classProcedure<MasterProcedureEnv>
-
remoteCallFailed
Description copied from interface:RemoteProcedureDispatcher.RemoteProcedure
Called when the executeProcedure call is failed.- Specified by:
remoteCallFailed
in interfaceRemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,
ServerName>
-
remoteOperationCompleted
Description copied from interface:RemoteProcedureDispatcher.RemoteProcedure
Called when RS tells the remote procedure is succeeded through thereportProcedureDone
method.- Specified by:
remoteOperationCompleted
in interfaceRemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,
ServerName>
-
remoteOperationFailed
Description copied from interface:RemoteProcedureDispatcher.RemoteProcedure
Called when RS tells the remote procedure is failed through thereportProcedureDone
method.- Specified by:
remoteOperationFailed
in interfaceRemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,
ServerName>
-
remoteOperationDone
-