Java 类org.apache.hadoop.hbase.ipc.RpcScheduler 实例源码

项目:ditb    文件:SimpleRpcSchedulerFactory.java   
@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);
}
项目:pbase    文件:SimpleRpcSchedulerFactory.java   
@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);
}
项目:ditb    文件:RegionServerQuotaManager.java   
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();
}
项目:HIndex    文件:SimpleRpcSchedulerFactory.java   
@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);
}
项目:hbase    文件:TestRowProcessorEndpoint.java   
@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();
}
项目:hbase    文件:RegionServerRpcQuotaManager.java   
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();
}
项目:hbase    文件:SimpleRpcSchedulerFactory.java   
@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);
}
项目:hbase    文件:TestRpcSchedulerFactory.java   
@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));
}
项目:PyroDB    文件:SimpleRpcSchedulerFactory.java   
@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);
}
项目:ditb    文件:SimpleRpcSchedulerFactory.java   
@Override
@Deprecated
public RpcScheduler create(Configuration conf, PriorityFunction priority) {
 return create(conf, priority, null);
}
项目:ditb    文件:RpcSchedulerFactory.java   
@Deprecated
RpcScheduler create(Configuration conf, PriorityFunction priority);
项目:ditb    文件:TestMetaTableAccessor.java   
@Override
public RpcScheduler create(Configuration conf, PriorityFunction priority, Abortable server) {
  final RpcScheduler delegate = super.create(conf, priority, server);
  return new SpyingRpcScheduler(delegate);
}
项目:ditb    文件:TestMetaTableAccessor.java   
public SpyingRpcScheduler(RpcScheduler delegate) {
  super(delegate);
}
项目:ditb    文件:IntegrationTestRpcClient.java   
TestRpcServer(RpcScheduler scheduler, Configuration conf) throws IOException {
  super(null, "testRpcServer", Lists
      .newArrayList(new BlockingServiceAndInterface(SERVICE, null)), new InetSocketAddress(
      "localhost", 0), conf, scheduler);
}
项目:pbase    文件:SimpleRpcSchedulerFactory.java   
@Override
@Deprecated
public RpcScheduler create(Configuration conf, PriorityFunction priority) {
 return create(conf, priority, null);
}
项目:pbase    文件:RpcSchedulerFactory.java   
@Deprecated
RpcScheduler create(Configuration conf, PriorityFunction priority);
项目:hbase    文件:SimpleRpcSchedulerFactory.java   
@Override
@Deprecated
public RpcScheduler create(Configuration conf, PriorityFunction priority) {
 return create(conf, priority, null);
}
项目:hbase    文件:FifoRpcSchedulerFactory.java   
@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);
}
项目:hbase    文件:FifoRpcSchedulerFactory.java   
@Deprecated
@Override
public RpcScheduler create(Configuration conf, PriorityFunction priority) {
  return create(conf, priority, null);
}
项目:hbase    文件:RpcSchedulerFactory.java   
@Deprecated
RpcScheduler create(Configuration conf, PriorityFunction priority);
项目:hbase    文件:TestMetaTableAccessor.java   
@Override
public RpcScheduler create(Configuration conf, PriorityFunction priority, Abortable server) {
  final RpcScheduler delegate = super.create(conf, priority, server);
  return new SpyingRpcScheduler(delegate);
}
项目:hbase    文件:TestMetaTableAccessor.java   
public SpyingRpcScheduler(RpcScheduler delegate) {
  super(delegate);
}
项目:hbase    文件:TestRpcSchedulerFactory.java   
@Test
public void testFifo() {
  RpcSchedulerFactory factory = new FifoRpcSchedulerFactory();
  RpcScheduler rpcScheduler = factory.create(this.conf, null, null);
  assertTrue(rpcScheduler.getClass().equals(FifoRpcScheduler.class));
}
项目:ditb    文件:RpcSchedulerFactory.java   
/**
 * Constructs a {@link org.apache.hadoop.hbase.ipc.RpcScheduler}.
 */
RpcScheduler create(Configuration conf, PriorityFunction priority, Abortable server);
项目:pbase    文件:RpcSchedulerFactory.java   
/**
 * Constructs a {@link org.apache.hadoop.hbase.ipc.RpcScheduler}.
 */
RpcScheduler create(Configuration conf, PriorityFunction priority, Abortable server);
项目:HIndex    文件:RpcSchedulerFactory.java   
/**
 * 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);
项目:hbase    文件:RpcSchedulerFactory.java   
/**
 * Constructs a {@link org.apache.hadoop.hbase.ipc.RpcScheduler}.
 */
RpcScheduler create(Configuration conf, PriorityFunction priority, Abortable server);
项目:PyroDB    文件:RpcSchedulerFactory.java   
/**
 * Constructs a {@link org.apache.hadoop.hbase.ipc.RpcScheduler}.
 */
RpcScheduler create(Configuration conf, PriorityFunction priority);