public class FifoRpcScheduler extends RpcScheduler
RpcScheduler} that serves incoming requests in order.
This can be used for HMaster, where no prioritization is needed.RpcScheduler.ContextIPC_SERVER_MAX_CALLQUEUE_LENGTH, IPC_SERVER_PRIORITY_MAX_CALLQUEUE_LENGTH| 构造器和说明 |
|---|
FifoRpcScheduler(org.apache.hadoop.conf.Configuration conf,
int handlerCount) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
dispatch(CallRunner task)
Dispatches an RPC request asynchronously.
|
int |
getActiveReadRpcHandlerCount()
Retrieves the number of active write rpc handler when use RWQueueRpcExecutor.
|
int |
getActiveRpcHandlerCount()
Retrieves the number of active handler.
|
int |
getActiveScanRpcHandlerCount()
Retrieves the number of active write rpc handler when use RWQueueRpcExecutor.
|
int |
getActiveWriteRpcHandlerCount()
Retrieves the number of active write rpc handler when use RWQueueRpcExecutor.
|
int |
getGeneralQueueLength()
Retrieves length of the general queue for metrics.
|
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.
|
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.
|
int |
getPriorityQueueLength()
Retrieves length of the priority queue for metrics.
|
int |
getReadQueueLength()
Retrieves length of the read queue for metrics when use RWQueueRpcExecutor.
|
int |
getReplicationQueueLength()
Retrieves length of the replication queue for metrics.
|
int |
getScanQueueLength()
Retrieves length of the scan queue for metrics when use RWQueueRpcExecutor.
|
int |
getWriteQueueLength()
Retrieves length of the write queue for metrics when use RWQueueRpcExecutor.
|
void |
init(RpcScheduler.Context context)
Does some quick initialization.
|
void |
start()
Prepares for request serving.
|
void |
stop()
Stops serving new requests.
|
public FifoRpcScheduler(org.apache.hadoop.conf.Configuration conf,
int handlerCount)
public void init(RpcScheduler.Context context)
RpcSchedulerRpcScheduler.start(). This method is called before start.init 在类中 RpcSchedulercontext - provides methods to retrieve runtime information frompublic void start()
RpcSchedulerstart 在类中 RpcSchedulerpublic void stop()
RpcSchedulerstop 在类中 RpcSchedulerpublic boolean dispatch(CallRunner task) throws IOException, InterruptedException
RpcSchedulerdispatch 在类中 RpcSchedulertask - the request to be dispatchedIOExceptionInterruptedExceptionpublic int getGeneralQueueLength()
RpcSchedulergetGeneralQueueLength 在类中 RpcSchedulerpublic int getPriorityQueueLength()
RpcSchedulergetPriorityQueueLength 在类中 RpcSchedulerpublic int getReplicationQueueLength()
RpcSchedulergetReplicationQueueLength 在类中 RpcSchedulerpublic int getActiveRpcHandlerCount()
RpcSchedulergetActiveRpcHandlerCount 在类中 RpcSchedulerpublic long getNumGeneralCallsDropped()
RpcSchedulergetNumGeneralCallsDropped 在类中 RpcSchedulerpublic long getNumLifoModeSwitches()
RpcSchedulergetNumLifoModeSwitches 在类中 RpcSchedulerpublic int getWriteQueueLength()
RpcSchedulergetWriteQueueLength 在类中 RpcSchedulerpublic int getReadQueueLength()
RpcSchedulergetReadQueueLength 在类中 RpcSchedulerpublic int getScanQueueLength()
RpcSchedulergetScanQueueLength 在类中 RpcSchedulerpublic int getActiveWriteRpcHandlerCount()
RpcSchedulerpublic int getActiveReadRpcHandlerCount()
RpcSchedulergetActiveReadRpcHandlerCount 在类中 RpcSchedulerpublic int getActiveScanRpcHandlerCount()
RpcSchedulergetActiveScanRpcHandlerCount 在类中 RpcSchedulerCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.