Class RSProcedureDispatcher
java.lang.Object
org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher<MasterProcedureEnv,ServerName>
org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher
- All Implemented Interfaces:
ServerListener
@Private
public class RSProcedureDispatcher
extends RemoteProcedureDispatcher<MasterProcedureEnv,ServerName>
implements ServerListener
A remote procecdure dispatcher for regionservers.
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate class
protected class
static class
static class
static class
private static interface
static final class
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher
RemoteProcedureDispatcher.BufferNode, RemoteProcedureDispatcher.RemoteNode<TEnv,
TRemote>, RemoteProcedureDispatcher.RemoteOperation, RemoteProcedureDispatcher.RemoteProcedure<TEnv, TRemote> -
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
private static final org.slf4j.Logger
protected final MasterServices
private MasterProcedureEnv
static final String
private final long
Fields inherited from class org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher
DISPATCH_DELAY_CONF_KEY, DISPATCH_MAX_QUEUE_SIZE_CONF_KEY, THREAD_POOL_SIZE_CONF_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
protected void
abortPendingOperations
(ServerName serverName, Set<RemoteProcedureDispatcher.RemoteProcedure> operations) private static org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.OpenRegionRequest
buildOpenRegionRequest
(MasterProcedureEnv env, ServerName serverName, List<RSProcedureDispatcher.RegionOpenOperation> operations) protected Thread.UncaughtExceptionHandler
protected void
remoteDispatch
(ServerName serverName, Set<RemoteProcedureDispatcher.RemoteProcedure> remoteProcedures) void
serverAdded
(ServerName serverName) The server has joined the cluster.void
serverRemoved
(ServerName serverName) The server was removed from the cluster.void
splitAndResolveOperation
(ServerName serverName, Set<RemoteProcedureDispatcher.RemoteProcedure> operations, RSProcedureDispatcher.RemoteProcedureResolver resolver) FetchesRemoteProcedureDispatcher.RemoteOperation
s from the givenremoteProcedures
and groups them by class of the returned operation.boolean
start()
boolean
stop()
Methods inherited from class org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher
addNode, addOperationToNode, buildAndGroupRequestByType, fetchType, hasNode, join, removeCompletedOperation, removeNode, setTimeoutExecutorUncaughtExceptionHandler, submitTask, submitTask
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.master.ServerListener
waiting
-
Field Details
-
LOG
-
RS_RPC_STARTUP_WAIT_TIME_CONF_KEY
- See Also:
-
DEFAULT_RS_RPC_STARTUP_WAIT_TIME
- See Also:
-
master
-
rsStartupWaitTime
-
procedureEnv
-
-
Constructor Details
-
RSProcedureDispatcher
-
-
Method Details
-
getUncaughtExceptionHandler
- Specified by:
getUncaughtExceptionHandler
in classRemoteProcedureDispatcher<MasterProcedureEnv,
ServerName>
-
start
- Overrides:
start
in classRemoteProcedureDispatcher<MasterProcedureEnv,
ServerName>
-
abort
-
stop
- Overrides:
stop
in classRemoteProcedureDispatcher<MasterProcedureEnv,
ServerName>
-
remoteDispatch
protected void remoteDispatch(ServerName serverName, Set<RemoteProcedureDispatcher.RemoteProcedure> remoteProcedures) - Specified by:
remoteDispatch
in classRemoteProcedureDispatcher<MasterProcedureEnv,
ServerName>
-
abortPendingOperations
protected void abortPendingOperations(ServerName serverName, Set<RemoteProcedureDispatcher.RemoteProcedure> operations) - Specified by:
abortPendingOperations
in classRemoteProcedureDispatcher<MasterProcedureEnv,
ServerName>
-
serverAdded
Description copied from interface:ServerListener
The server has joined the cluster.- Specified by:
serverAdded
in interfaceServerListener
- Parameters:
serverName
- The remote servers name.
-
serverRemoved
Description copied from interface:ServerListener
The server was removed from the cluster.- Specified by:
serverRemoved
in interfaceServerListener
- Parameters:
serverName
- The remote servers name.
-
splitAndResolveOperation
public void splitAndResolveOperation(ServerName serverName, Set<RemoteProcedureDispatcher.RemoteProcedure> operations, RSProcedureDispatcher.RemoteProcedureResolver resolver) FetchesRemoteProcedureDispatcher.RemoteOperation
s from the givenremoteProcedures
and groups them by class of the returned operation. Thenresolver
is used to dispatchRSProcedureDispatcher.RegionOpenOperation
s andRSProcedureDispatcher.RegionCloseOperation
s.- Parameters:
serverName
- RegionServer to which the remote operations are sentoperations
- Remote procedures which are dispatched to the given serverresolver
- Used to dispatch remote procedures to given server.
-
buildOpenRegionRequest
private static org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.OpenRegionRequest buildOpenRegionRequest(MasterProcedureEnv env, ServerName serverName, List<RSProcedureDispatcher.RegionOpenOperation> operations)
-