Package org.apache.hadoop.hbase.ipc

Examples of org.apache.hadoop.hbase.ipc.RpcServer$BlockingServiceAndInterface


    InetSocketAddress isa = new InetSocketAddress("localhost", 0);
    TestDelayedImplementation instance = new TestDelayedImplementation(delayReturnValue);
    BlockingService service =
        TestDelayedRpcProtos.TestDelayedService.newReflectiveBlockingService(instance);

    rpcServer = new RpcServer(null, "testSecuredDelayedRpc",
        Lists.newArrayList(new RpcServer.BlockingServiceAndInterface(service, null)),
          isa, conf, new FifoRpcScheduler(conf, 1));
    rpcServer.start();
    RpcClient rpcClient = new RpcClient(conf, HConstants.DEFAULT_CLUSTER_ID.toString());
    try {
View Full Code Here


    String name = "master/" + initialIsa.toString();
    // Set how many times to retry talking to another server over HConnection.
    HConnectionManager.setServerSideHConnectionRetries(this.conf, name, LOG);
    int numHandlers = conf.getInt(HConstants.MASTER_HANDLER_COUNT,
      conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT, HConstants.DEFAULT_MASTER_HANLDER_COUNT));
    this.rpcServer = new RpcServer(this, name, getServices(),
      initialIsa, // BindAddress is IP we got for this server.
      conf,
      new FifoRpcScheduler(conf, numHandlers));
    // Set our address.
    this.isa = this.rpcServer.getListenerAddress();
View Full Code Here

    } catch (InstantiationException e) {
      throw new IllegalArgumentException(e);
    } catch (IllegalAccessException e) {
      throw new IllegalArgumentException(e);
    }
    this.rpcServer = new RpcServer(this, name, getServices(),
      /*HBaseRPCErrorHandler.class, OnlineRegions.class},*/
      initialIsa, // BindAddress is IP we got for this server.
      conf,
      rpcSchedulerFactory.create(conf, this));

View Full Code Here

    String name = "master/" + initialIsa.toString();
    // Set how many times to retry talking to another server over HConnection.
    HConnectionManager.setServerSideHConnectionRetries(this.conf, name, LOG);
    int numHandlers = conf.getInt(HConstants.MASTER_HANDLER_COUNT,
      conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT, HConstants.DEFAULT_MASTER_HANLDER_COUNT));
    this.rpcServer = new RpcServer(this, name, getServices(),
      initialIsa, // BindAddress is IP we got for this server.
      conf,
      new FifoRpcScheduler(conf, numHandlers));
    // Set our address.
    this.isa = this.rpcServer.getListenerAddress();
View Full Code Here

    } catch (InstantiationException e) {
      throw new IllegalArgumentException(e);
    } catch (IllegalAccessException e) {
      throw new IllegalArgumentException(e);
    }
    this.rpcServer = new RpcServer(this, name, getServices(),
      /*HBaseRPCErrorHandler.class, OnlineRegions.class},*/
      initialIsa, // BindAddress is IP we got for this server.
      conf,
      rpcSchedulerFactory.create(conf, this));

View Full Code Here

    // if running at region
    if (env instanceof RegionCoprocessorEnvironment) {
      RegionCoprocessorEnvironment regionEnv =
          (RegionCoprocessorEnvironment)env;
      RpcServer server = regionEnv.getRegionServerServices().getRpcServer();
      if (server instanceof SecureServer) {
        SecretManager mgr = ((SecureServer)server).getSecretManager();
        if (mgr instanceof AuthenticationTokenSecretManager) {
          secretManager = (AuthenticationTokenSecretManager)mgr;
        }
View Full Code Here

    conf.set(HBaseRPC.RPC_ENGINE_PROP, SecureRpcEngine.class.getName());
    conf.set("hbase.coprocessor.region.classes",
        IdentityCoprocessor.class.getName());
    TEST_UTIL.startMiniCluster();
    HRegionServer rs = TEST_UTIL.getMiniHBaseCluster().getRegionServer(0);
    RpcServer server = rs.getRpcServer();
    assertTrue(server instanceof SecureServer);
    SecretManager mgr =
        ((SecureServer)server).getSecretManager();
    assertTrue(mgr instanceof AuthenticationTokenSecretManager);
    secretManager = (AuthenticationTokenSecretManager)mgr;
View Full Code Here

    InetSocketAddress isa = new InetSocketAddress("localhost", 0);
    TestDelayedImplementation instance = new TestDelayedImplementation(delayReturnValue);
    BlockingService service =
        TestDelayedRpcProtos.TestDelayedService.newReflectiveBlockingService(instance);

    rpcServer = new RpcServer(null, "testSecuredDelayedRpc",
        Lists.newArrayList(new RpcServer.BlockingServiceAndInterface(service, null)),
          isa, conf, new FifoRpcScheduler(conf, 1));
    rpcServer.start();
    RpcClient rpcClient = new RpcClient(conf, HConstants.DEFAULT_CLUSTER_ID.toString());
    try {
View Full Code Here

    }
    priority = new AnnotationReadingPriorityFunction(this);
    String name = rs.getProcessName() + "/" + initialIsa.toString();
    // Set how many times to retry talking to another server over HConnection.
    ConnectionUtils.setServerSideHConnectionRetriesConfig(rs.conf, name, LOG);
    rpcServer = new RpcServer(rs, name, getServices(),
      initialIsa, // BindAddress is IP we got for this server.
      rs.conf,
      rpcSchedulerFactory.create(rs.conf, this));

    scannerLeaseTimeoutPeriod = rs.conf.getInt(
View Full Code Here

    conf.set(HBaseRPC.RPC_ENGINE_PROP, SecureRpcEngine.class.getName());
    conf.set("hbase.coprocessor.region.classes",
        IdentityCoprocessor.class.getName());
    TEST_UTIL.startMiniCluster();
    HRegionServer rs = TEST_UTIL.getMiniHBaseCluster().getRegionServer(0);
    RpcServer server = rs.getRpcServer();
    assertTrue(server instanceof SecureServer);
    SecretManager mgr =
        ((SecureServer)server).getSecretManager();
    assertTrue(mgr instanceof AuthenticationTokenSecretManager);
    secretManager = (AuthenticationTokenSecretManager)mgr;
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.ipc.RpcServer$BlockingServiceAndInterface

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.