Package org.apache.hadoop.hbase.ipc
Class MasterFifoRpcScheduler
java.lang.Object
org.apache.hadoop.hbase.ipc.RpcScheduler
org.apache.hadoop.hbase.ipc.FifoRpcScheduler
org.apache.hadoop.hbase.ipc.MasterFifoRpcScheduler
A special RpcScheduler} only used for master. This scheduler separates RegionServerReport
requests to independent handlers to avoid these requests block other requests. To use this
scheduler, please set "hbase.master.rpc.scheduler.factory.class" to
"org.apache.hadoop.hbase.ipc.MasterFifoRpcScheduler".
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.ipc.RpcScheduler
RpcScheduler.Context
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
static final String
Set RSReport requests handlers count when masters use MasterFifoRpcScheduler.private static final String
private ThreadPoolExecutor
private final int
private final AtomicInteger
private final int
Fields inherited from class org.apache.hadoop.hbase.ipc.FifoRpcScheduler
executor, handlerCount, maxQueueLength, queueSize
Fields inherited from class org.apache.hadoop.hbase.ipc.RpcScheduler
IPC_SERVER_BULKLOAD_MAX_CALLQUEUE_LENGTH, IPC_SERVER_MAX_CALLQUEUE_LENGTH, IPC_SERVER_PRIORITY_MAX_CALLQUEUE_LENGTH, IPC_SERVER_REPLICATION_MAX_CALLQUEUE_LENGTH
-
Constructor Summary
ConstructorDescriptionMasterFifoRpcScheduler
(org.apache.hadoop.conf.Configuration conf, int callHandlerCount, int rsReportHandlerCount) -
Method Summary
Modifier and TypeMethodDescriptionboolean
dispatch
(CallRunner task) Dispatches an RPC request asynchronously.int
Retrieves the total number of active handler.Get call queue informationint
Retrieves length of the general queue for metrics.void
start()
Prepares for request serving.void
stop()
Stops serving new requests.Methods inherited from class org.apache.hadoop.hbase.ipc.FifoRpcScheduler
executeRpcCall, getActiveBulkLoadRpcHandlerCount, getActiveGeneralRpcHandlerCount, getActiveMetaPriorityRpcHandlerCount, getActivePriorityRpcHandlerCount, getActiveReadRpcHandlerCount, getActiveReplicationRpcHandlerCount, getActiveScanRpcHandlerCount, getActiveWriteRpcHandlerCount, getBulkLoadQueueLength, getCallMethod, getMetaPriorityQueueLength, getNumGeneralCallsDropped, getNumLifoModeSwitches, getPriorityQueueLength, getReadQueueLength, getReplicationQueueLength, getScanQueueLength, getWriteQueueLength, init, updateMethodCountAndSizeByQueue
-
Field Details
-
LOG
-
MASTER_SERVER_REPORT_HANDLER_COUNT
Set RSReport requests handlers count when masters use MasterFifoRpcScheduler. The default value is half of "hbase.regionserver.handler.count" value, but at least 1. The other handlers count is "hbase.regionserver.handler.count" value minus RSReport handlers count, but at least 1 too.- See Also:
-
REGION_SERVER_REPORT
- See Also:
-
rsReportHandlerCount
-
rsRsreportMaxQueueLength
-
rsReportQueueSize
-
rsReportExecutor
-
-
Constructor Details
-
MasterFifoRpcScheduler
public MasterFifoRpcScheduler(org.apache.hadoop.conf.Configuration conf, int callHandlerCount, int rsReportHandlerCount)
-
-
Method Details
-
start
Description copied from class:RpcScheduler
Prepares for request serving. An implementation may start some handler threads here.- Overrides:
start
in classFifoRpcScheduler
-
stop
Description copied from class:RpcScheduler
Stops serving new requests.- Overrides:
stop
in classFifoRpcScheduler
-
dispatch
Description copied from class:RpcScheduler
Dispatches an RPC request asynchronously. An implementation is free to choose to process the request immediately or delay it for later processing.- Overrides:
dispatch
in classFifoRpcScheduler
- Parameters:
task
- the request to be dispatched
-
getGeneralQueueLength
Description copied from class:RpcScheduler
Retrieves length of the general queue for metrics.- Overrides:
getGeneralQueueLength
in classFifoRpcScheduler
-
getActiveRpcHandlerCount
Description copied from class:RpcScheduler
Retrieves the total number of active handler.- Overrides:
getActiveRpcHandlerCount
in classFifoRpcScheduler
-
getCallQueueInfo
Description copied from class:RpcScheduler
Get call queue information- Overrides:
getCallQueueInfo
in classFifoRpcScheduler
-