@InterfaceAudience.Private public abstract class RemoteProcedureDispatcher<TEnv,TRemote extends Comparable<TRemote>> extends Object
Call start()
and then submitTask(Runnable)
. When done,
call stop()
.
Modifier and Type | Class and Description |
---|---|
protected class |
RemoteProcedureDispatcher.BufferNode
Node that contains a set of RemoteProcedures
|
static interface |
RemoteProcedureDispatcher.RemoteNode<TEnv,TRemote>
Account of what procedures are running on remote node.
|
static class |
RemoteProcedureDispatcher.RemoteOperation
Data structure with reference to remote operation.
|
static interface |
RemoteProcedureDispatcher.RemoteProcedure<TEnv,TRemote>
Remote procedure reference.
|
Modifier and Type | Field and Description |
---|---|
static String |
DISPATCH_DELAY_CONF_KEY |
static String |
DISPATCH_MAX_QUEUE_SIZE_CONF_KEY |
static String |
THREAD_POOL_SIZE_CONF_KEY |
Modifier | Constructor and Description |
---|---|
protected |
RemoteProcedureDispatcher(org.apache.hadoop.conf.Configuration conf) |
public static final String THREAD_POOL_SIZE_CONF_KEY
public static final String DISPATCH_DELAY_CONF_KEY
public static final String DISPATCH_MAX_QUEUE_SIZE_CONF_KEY
protected RemoteProcedureDispatcher(org.apache.hadoop.conf.Configuration conf)
public boolean start()
public boolean stop()
public void join()
protected abstract Thread.UncaughtExceptionHandler getUncaughtExceptionHandler()
public void addNode(TRemote key)
key
- the node identifierpublic void addOperationToNode(TRemote key, RemoteProcedureDispatcher.RemoteProcedure rp) throws NullTargetServerDispatchException, NoServerDispatchException, NoNodeDispatchException
key
- the node identifierNullTargetServerDispatchException
NoServerDispatchException
NoNodeDispatchException
public void removeCompletedOperation(TRemote key, RemoteProcedureDispatcher.RemoteProcedure rp)
public boolean removeNode(TRemote key)
key
- the node identifierprotected final void submitTask(Runnable task)
protected abstract void remoteDispatch(TRemote key, Set<RemoteProcedureDispatcher.RemoteProcedure> operations)
protected abstract void abortPendingOperations(TRemote key, Set<RemoteProcedureDispatcher.RemoteProcedure> operations)
protected org.apache.hbase.thirdparty.com.google.common.collect.ArrayListMultimap<Class<?>,RemoteProcedureDispatcher.RemoteOperation> buildAndGroupRequestByType(TEnv env, TRemote remote, Set<RemoteProcedureDispatcher.RemoteProcedure> remoteProcedures)
protected <T extends RemoteProcedureDispatcher.RemoteOperation> List<T> fetchType(org.apache.hbase.thirdparty.com.google.common.collect.ArrayListMultimap<Class<?>,RemoteProcedureDispatcher.RemoteOperation> requestByType, Class<T> type)
Copyright © 2007–2019 Cloudera. All rights reserved.