@InterfaceAudience.Private public class RSProcedureDispatcher extends RemoteProcedureDispatcher<MasterProcedureEnv,ServerName> implements ServerListener
Modifier and Type | Class and Description |
---|---|
private class |
RSProcedureDispatcher.DeadRSRemoteCall |
protected class |
RSProcedureDispatcher.ExecuteProceduresRemoteCall |
static class |
RSProcedureDispatcher.RegionCloseOperation |
static class |
RSProcedureDispatcher.RegionOpenOperation |
static class |
RSProcedureDispatcher.RegionOperation |
private static interface |
RSProcedureDispatcher.RemoteProcedureResolver |
static class |
RSProcedureDispatcher.ServerOperation |
RemoteProcedureDispatcher.BufferNode, RemoteProcedureDispatcher.RemoteNode<TEnv,TRemote>, RemoteProcedureDispatcher.RemoteOperation, RemoteProcedureDispatcher.RemoteProcedure<TEnv,TRemote>
Modifier and Type | Field and Description |
---|---|
private static int |
DEFAULT_RS_RPC_STARTUP_WAIT_TIME |
private static org.slf4j.Logger |
LOG |
protected MasterServices |
master |
private MasterProcedureEnv |
procedureEnv |
static String |
RS_RPC_STARTUP_WAIT_TIME_CONF_KEY |
private long |
rsStartupWaitTime |
DISPATCH_DELAY_CONF_KEY, DISPATCH_MAX_QUEUE_SIZE_CONF_KEY, THREAD_POOL_SIZE_CONF_KEY
Constructor and Description |
---|
RSProcedureDispatcher(MasterServices master) |
Modifier and Type | Method and Description |
---|---|
private void |
abort(Thread t,
Throwable e) |
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 |
getUncaughtExceptionHandler() |
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)
Fetches
RemoteProcedureDispatcher.RemoteOperation s
from the given remoteProcedures and groups them by class of the returned operation. |
boolean |
start() |
boolean |
stop() |
addNode, addOperationToNode, buildAndGroupRequestByType, fetchType, join, removeCompletedOperation, removeNode, setTimeoutExecutorUncaughtExceptionHandler, submitTask, submitTask
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
waiting
private static final org.slf4j.Logger LOG
public static final String RS_RPC_STARTUP_WAIT_TIME_CONF_KEY
private static final int DEFAULT_RS_RPC_STARTUP_WAIT_TIME
protected final MasterServices master
private final long rsStartupWaitTime
private MasterProcedureEnv procedureEnv
public RSProcedureDispatcher(MasterServices master)
protected Thread.UncaughtExceptionHandler getUncaughtExceptionHandler()
getUncaughtExceptionHandler
in class RemoteProcedureDispatcher<MasterProcedureEnv,ServerName>
public boolean start()
start
in class RemoteProcedureDispatcher<MasterProcedureEnv,ServerName>
public boolean stop()
stop
in class RemoteProcedureDispatcher<MasterProcedureEnv,ServerName>
protected void remoteDispatch(ServerName serverName, Set<RemoteProcedureDispatcher.RemoteProcedure> remoteProcedures)
remoteDispatch
in class RemoteProcedureDispatcher<MasterProcedureEnv,ServerName>
protected void abortPendingOperations(ServerName serverName, Set<RemoteProcedureDispatcher.RemoteProcedure> operations)
abortPendingOperations
in class RemoteProcedureDispatcher<MasterProcedureEnv,ServerName>
public void serverAdded(ServerName serverName)
ServerListener
serverAdded
in interface ServerListener
serverName
- The remote servers name.public void serverRemoved(ServerName serverName)
ServerListener
serverRemoved
in interface ServerListener
serverName
- The remote servers name.public void splitAndResolveOperation(ServerName serverName, Set<RemoteProcedureDispatcher.RemoteProcedure> operations, RSProcedureDispatcher.RemoteProcedureResolver resolver)
RemoteProcedureDispatcher.RemoteOperation
s
from the given remoteProcedures
and groups them by class of the returned operation.
Then resolver
is used to dispatch RSProcedureDispatcher.RegionOpenOperation
s and
RSProcedureDispatcher.RegionCloseOperation
s.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.private static org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.OpenRegionRequest buildOpenRegionRequest(MasterProcedureEnv env, ServerName serverName, List<RSProcedureDispatcher.RegionOpenOperation> operations)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.