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
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerstatic final StringSet RSReport requests handlers count when masters use MasterFifoRpcScheduler.private static final Stringprivate ThreadPoolExecutorprivate final intprivate final AtomicIntegerprivate final intFields inherited from class org.apache.hadoop.hbase.ipc.FifoRpcScheduler
executor, handlerCount, maxQueueLength, queueSizeFields 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
ConstructorsConstructorDescriptionMasterFifoRpcScheduler(org.apache.hadoop.conf.Configuration conf, int callHandlerCount, int rsReportHandlerCount) -
Method Summary
Modifier and TypeMethodDescriptionbooleandispatch(CallRunner task) Dispatches an RPC request asynchronously.intRetrieves the total number of active handler.Get call queue informationintRetrieves length of the general queue for metrics.voidstart()Prepares for request serving.voidstop()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:RpcSchedulerPrepares for request serving. An implementation may start some handler threads here.- Overrides:
startin classFifoRpcScheduler
-
stop
Description copied from class:RpcSchedulerStops serving new requests.- Overrides:
stopin classFifoRpcScheduler
-
dispatch
Description copied from class:RpcSchedulerDispatches an RPC request asynchronously. An implementation is free to choose to process the request immediately or delay it for later processing.- Overrides:
dispatchin classFifoRpcScheduler- Parameters:
task- the request to be dispatched
-
getGeneralQueueLength
Description copied from class:RpcSchedulerRetrieves length of the general queue for metrics.- Overrides:
getGeneralQueueLengthin classFifoRpcScheduler
-
getActiveRpcHandlerCount
Description copied from class:RpcSchedulerRetrieves the total number of active handler.- Overrides:
getActiveRpcHandlerCountin classFifoRpcScheduler
-
getCallQueueInfo
Description copied from class:RpcSchedulerGet call queue information- Overrides:
getCallQueueInfoin classFifoRpcScheduler
-