1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.hadoop.hbase.regionserver;
19
20 import org.apache.hadoop.conf.Configuration;
21 import org.apache.hadoop.hbase.HConstants;
22 import org.apache.hadoop.hbase.ipc.RpcScheduler;
23 import org.apache.hadoop.hbase.ipc.SimpleRpcScheduler;
24
25
26 class SimpleRpcSchedulerFactory implements RpcSchedulerFactory {
27
28 @Override
29 public RpcScheduler create(Configuration conf, RegionServerServices server) {
30 int handlerCount = conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT,
31 HConstants.DEFAULT_REGION_SERVER_HANDLER_COUNT);
32 return new SimpleRpcScheduler(
33 conf,
34 handlerCount,
35 conf.getInt(HConstants.REGION_SERVER_META_HANDLER_COUNT,
36 HConstants.DEFAULT_REGION_SERVER_META_HANDLER_COUNT),
37 conf.getInt(HConstants.REGION_SERVER_REPLICATION_HANDLER_COUNT,
38 HConstants.DEFAULT_REGION_SERVER_REPLICATION_HANDLER_COUNT),
39 server,
40 HConstants.QOS_THRESHOLD);
41 }
42 }