@Override public RpcScheduler create(Configuration conf, PriorityFunction priority, Abortable server) { int handlerCount = conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT, HConstants.DEFAULT_REGION_SERVER_HANDLER_COUNT); return new SimpleRpcScheduler( conf, handlerCount, conf.getInt(HConstants.REGION_SERVER_HIGH_PRIORITY_HANDLER_COUNT, HConstants.DEFAULT_REGION_SERVER_HIGH_PRIORITY_HANDLER_COUNT), conf.getInt(HConstants.REGION_SERVER_REPLICATION_HANDLER_COUNT, HConstants.DEFAULT_REGION_SERVER_REPLICATION_HANDLER_COUNT), priority, server, HConstants.QOS_THRESHOLD); }
public void start(final RpcScheduler rpcScheduler) throws IOException { if (!QuotaUtil.isQuotaEnabled(rsServices.getConfiguration())) { LOG.info("Quota support disabled"); return; } LOG.info("Initializing quota support"); // Initialize quota cache quotaCache = new QuotaCache(rsServices); quotaCache.start(); }
@Override public RpcScheduler create(Configuration conf, RegionServerServices server) { int handlerCount = conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT, HConstants.DEFAULT_REGION_SERVER_HANDLER_COUNT); return new SimpleRpcScheduler( conf, handlerCount, conf.getInt(HConstants.REGION_SERVER_META_HANDLER_COUNT, HConstants.DEFAULT_REGION_SERVER_META_HANDLER_COUNT), conf.getInt(HConstants.REGION_SERVER_REPLICATION_HANDLER_COUNT, HConstants.DEFAULT_REGION_SERVER_REPLICATION_HANDLER_COUNT), server, HConstants.QOS_THRESHOLD); }
@BeforeClass public static void setupBeforeClass() throws Exception { Configuration conf = util.getConfiguration(); conf.setStrings(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, RowProcessorEndpoint.class.getName()); conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 2); conf.setLong("hbase.hregion.row.processor.timeout", 1000L); conf.setLong(RpcScheduler.IPC_SERVER_MAX_CALLQUEUE_LENGTH, 2048); util.startMiniCluster(); }
public void start(final RpcScheduler rpcScheduler) throws IOException { if (!QuotaUtil.isQuotaEnabled(rsServices.getConfiguration())) { LOG.info("Quota support disabled"); return; } LOG.info("Initializing RPC quota support"); // Initialize quota cache quotaCache = new QuotaCache(rsServices); quotaCache.start(); }
@Test public void testRWQ() { // Set some configs just to see how it changes the scheduler. Can't assert the settings had // an effect. Just eyeball the log. this.conf.setDouble(RWQueueRpcExecutor.CALL_QUEUE_READ_SHARE_CONF_KEY, 0.5); this.conf.setDouble(RpcExecutor.CALL_QUEUE_HANDLER_FACTOR_CONF_KEY, 0.5); this.conf.setDouble(RWQueueRpcExecutor.CALL_QUEUE_SCAN_SHARE_CONF_KEY, 0.5); RpcSchedulerFactory factory = new SimpleRpcSchedulerFactory(); RpcScheduler rpcScheduler = factory.create(this.conf, null, null); assertTrue(rpcScheduler.getClass().equals(SimpleRpcScheduler.class)); }
@Override public RpcScheduler create(Configuration conf, PriorityFunction priority) { int handlerCount = conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT, HConstants.DEFAULT_REGION_SERVER_HANDLER_COUNT); return new SimpleRpcScheduler( conf, handlerCount, conf.getInt(HConstants.REGION_SERVER_META_HANDLER_COUNT, HConstants.DEFAULT_REGION_SERVER_META_HANDLER_COUNT), conf.getInt(HConstants.REGION_SERVER_REPLICATION_HANDLER_COUNT, HConstants.DEFAULT_REGION_SERVER_REPLICATION_HANDLER_COUNT), priority, HConstants.QOS_THRESHOLD); }
@Override @Deprecated public RpcScheduler create(Configuration conf, PriorityFunction priority) { return create(conf, priority, null); }
@Deprecated RpcScheduler create(Configuration conf, PriorityFunction priority);
@Override public RpcScheduler create(Configuration conf, PriorityFunction priority, Abortable server) { final RpcScheduler delegate = super.create(conf, priority, server); return new SpyingRpcScheduler(delegate); }
public SpyingRpcScheduler(RpcScheduler delegate) { super(delegate); }
TestRpcServer(RpcScheduler scheduler, Configuration conf) throws IOException { super(null, "testRpcServer", Lists .newArrayList(new BlockingServiceAndInterface(SERVICE, null)), new InetSocketAddress( "localhost", 0), conf, scheduler); }
@Override public RpcScheduler create(Configuration conf, PriorityFunction priority, Abortable server) { int handlerCount = conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT, HConstants.DEFAULT_REGION_SERVER_HANDLER_COUNT); return new FifoRpcScheduler(conf, handlerCount); }
@Deprecated @Override public RpcScheduler create(Configuration conf, PriorityFunction priority) { return create(conf, priority, null); }
@Test public void testFifo() { RpcSchedulerFactory factory = new FifoRpcSchedulerFactory(); RpcScheduler rpcScheduler = factory.create(this.conf, null, null); assertTrue(rpcScheduler.getClass().equals(FifoRpcScheduler.class)); }
/** * Constructs a {@link org.apache.hadoop.hbase.ipc.RpcScheduler}. */ RpcScheduler create(Configuration conf, PriorityFunction priority, Abortable server);
/** * Constructs a {@link org.apache.hadoop.hbase.ipc.RpcScheduler}. * * Please note that this method is called in constructor of {@link HRegionServer}, so some * fields may not be ready for access. The reason that {@code HRegionServer} is passed as * parameter here is that an RPC scheduler may need to access data structure inside * {@code HRegionServer} (see example in {@link SimpleRpcSchedulerFactory}). */ RpcScheduler create(Configuration conf, RegionServerServices server);
/** * Constructs a {@link org.apache.hadoop.hbase.ipc.RpcScheduler}. */ RpcScheduler create(Configuration conf, PriorityFunction priority);