@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix"}) @InterfaceStability.Evolving public abstract class RpcScheduler extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RpcScheduler.Context
Exposes runtime information of a
RpcServer that a RpcScheduler may need. |
Modifier and Type | Field and Description |
---|---|
static String |
IPC_SERVER_MAX_CALLQUEUE_LENGTH |
static String |
IPC_SERVER_PRIORITY_MAX_CALLQUEUE_LENGTH |
Constructor and Description |
---|
RpcScheduler() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
dispatch(CallRunner task)
Dispatches an RPC request asynchronously.
|
abstract int |
getActiveReadRpcHandlerCount()
Retrieves the number of active write rpc handler when use RWQueueRpcExecutor.
|
abstract int |
getActiveRpcHandlerCount()
Retrieves the number of active handler.
|
abstract int |
getActiveScanRpcHandlerCount()
Retrieves the number of active write rpc handler when use RWQueueRpcExecutor.
|
abstract int |
getActiveWriteRpcHandlerCount()
Retrieves the number of active write rpc handler when use RWQueueRpcExecutor.
|
abstract CallQueueInfo |
getCallQueueInfo()
Get call queue information
|
abstract int |
getGeneralQueueLength()
Retrieves length of the general queue for metrics.
|
abstract int |
getMetaPriorityQueueLength()
Retrieves length of the meta priority queue for metrics.
|
abstract long |
getNumGeneralCallsDropped()
If CoDel-based RPC executors are used, retrieves the number of Calls that were dropped
from general queue because RPC executor is under high load; returns 0 otherwise.
|
abstract long |
getNumLifoModeSwitches()
If CoDel-based RPC executors are used, retrieves the number of Calls that were
picked from the tail of the queue (indicating adaptive LIFO mode, when
in the period of overloade we serve last requests first); returns 0 otherwise.
|
abstract int |
getPriorityQueueLength()
Retrieves length of the priority queue for metrics.
|
abstract int |
getReadQueueLength()
Retrieves length of the read queue for metrics when use RWQueueRpcExecutor.
|
abstract int |
getReplicationQueueLength()
Retrieves length of the replication queue for metrics.
|
abstract int |
getScanQueueLength()
Retrieves length of the scan queue for metrics when use RWQueueRpcExecutor.
|
abstract int |
getWriteQueueLength()
Retrieves length of the write queue for metrics when use RWQueueRpcExecutor.
|
abstract void |
init(RpcScheduler.Context context)
Does some quick initialization.
|
abstract void |
start()
Prepares for request serving.
|
abstract void |
stop()
Stops serving new requests.
|
public static final String IPC_SERVER_MAX_CALLQUEUE_LENGTH
public static final String IPC_SERVER_PRIORITY_MAX_CALLQUEUE_LENGTH
public abstract void init(RpcScheduler.Context context)
start()
. This method is called before start
.context
- provides methods to retrieve runtime information frompublic abstract void start()
public abstract void stop()
public abstract boolean dispatch(CallRunner task) throws IOException, InterruptedException
task
- the request to be dispatchedIOException
InterruptedException
public abstract CallQueueInfo getCallQueueInfo()
public abstract int getGeneralQueueLength()
public abstract int getPriorityQueueLength()
public abstract int getMetaPriorityQueueLength()
public abstract int getReplicationQueueLength()
public abstract int getActiveRpcHandlerCount()
public abstract long getNumGeneralCallsDropped()
public abstract long getNumLifoModeSwitches()
public abstract int getWriteQueueLength()
public abstract int getReadQueueLength()
public abstract int getScanQueueLength()
public abstract int getActiveWriteRpcHandlerCount()
public abstract int getActiveReadRpcHandlerCount()
public abstract int getActiveScanRpcHandlerCount()
Copyright © 2007–2019 Cloudera. All rights reserved.