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.classification.InterfaceAudience;
21 import org.apache.hadoop.classification.InterfaceStability;
22 import org.apache.hadoop.conf.Configuration;
23 import org.apache.hadoop.hbase.HBaseInterfaceAudience;
24 import org.apache.hadoop.hbase.HConstants;
25 import org.apache.hadoop.hbase.ipc.RpcScheduler;
26 import org.apache.hadoop.hbase.ipc.SimpleRpcScheduler;
27
28
29 @InterfaceAudience.LimitedPrivate({HBaseInterfaceAudience.COPROC, HBaseInterfaceAudience.PHOENIX})
30 @InterfaceStability.Evolving
31 public class SimpleRpcSchedulerFactory implements RpcSchedulerFactory {
32 @Override
33 public RpcScheduler create(Configuration conf, RegionServerServices server) {
34 int handlerCount = conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT,
35 HConstants.DEFAULT_REGION_SERVER_HANDLER_COUNT);
36 return new SimpleRpcScheduler(
37 conf,
38 handlerCount,
39 conf.getInt(HConstants.REGION_SERVER_META_HANDLER_COUNT,
40 HConstants.DEFAULT_REGION_SERVER_META_HANDLER_COUNT),
41 conf.getInt(HConstants.REGION_SERVER_REPLICATION_HANDLER_COUNT,
42 HConstants.DEFAULT_REGION_SERVER_REPLICATION_HANDLER_COUNT),
43 server,
44 HConstants.QOS_THRESHOLD);
45 }
46 }