@InterfaceAudience.Private public abstract class ServerRemoteProcedure extends Procedure<MasterProcedureEnv> implements RemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
Procedure.LockState
Modifier and Type | Field and Description |
---|---|
protected boolean |
dispatched |
protected ProcedureEvent<?> |
event |
protected static org.slf4j.Logger |
LOG |
protected boolean |
succ |
protected ServerName |
targetServer |
NO_PROC_ID, NO_TIMEOUT
Constructor and Description |
---|
ServerRemoteProcedure() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
complete(MasterProcedureEnv env,
Throwable error) |
protected void |
completionCleanup(MasterProcedureEnv env)
Called when the procedure is marked as completed (success or rollback).
|
protected Procedure<MasterProcedureEnv>[] |
execute(MasterProcedureEnv env)
The main code of the procedure.
|
void |
remoteCallFailed(MasterProcedureEnv env,
ServerName serverName,
IOException exception)
Called when the executeProcedure call is failed.
|
void |
remoteOperationCompleted(MasterProcedureEnv env)
Called when RS tells the remote procedure is succeeded through the
reportProcedureDone method. |
(package private) void |
remoteOperationDone(MasterProcedureEnv env,
Throwable error) |
void |
remoteOperationFailed(MasterProcedureEnv env,
RemoteProcedureException error)
Called when RS tells the remote procedure is failed through the
reportProcedureDone
method. |
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, isRunnable, isSuccess, isWaiting, isYieldAfterExecutionStep, releaseLock, removeStackIndex, rollback, serializeStateData, setAbortFailure, setChildrenLatch, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, setTimeoutFailure, shouldWaitClientAck, skipPersistence, toString, toStringClass, toStringClassDetails, toStringDetails, toStringSimpleSB, toStringState, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, waitInitialized, wasExecuted
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
remoteCallBuild, storeInDispatchedQueue
protected static final org.slf4j.Logger LOG
protected ProcedureEvent<?> event
protected ServerName targetServer
protected boolean dispatched
protected boolean succ
public ServerRemoteProcedure()
protected abstract void complete(MasterProcedureEnv env, Throwable error)
protected Procedure<MasterProcedureEnv>[] execute(MasterProcedureEnv env) throws ProcedureYieldException, ProcedureSuspendedException, InterruptedException
Procedure
execute
in class Procedure<MasterProcedureEnv>
env
- the environment passed to the ProcedureExecutorProcedureYieldException
- 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.protected void completionCleanup(MasterProcedureEnv env)
Procedure
completionCleanup
in class Procedure<MasterProcedureEnv>
public void remoteCallFailed(MasterProcedureEnv env, ServerName serverName, IOException exception)
RemoteProcedureDispatcher.RemoteProcedure
remoteCallFailed
in interface RemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
public void remoteOperationCompleted(MasterProcedureEnv env)
RemoteProcedureDispatcher.RemoteProcedure
reportProcedureDone
method.remoteOperationCompleted
in interface RemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
public void remoteOperationFailed(MasterProcedureEnv env, RemoteProcedureException error)
RemoteProcedureDispatcher.RemoteProcedure
reportProcedureDone
method.remoteOperationFailed
in interface RemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
void remoteOperationDone(MasterProcedureEnv env, Throwable error)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.