Package org.apache.hadoop.hbase.ipc

Examples of org.apache.hadoop.hbase.ipc.RpcEngine


    HMaster hm = new HMaster(conf);

    ServerName sm = hm.getServerName();
    InetSocketAddress isa = new InetSocketAddress(sm.getHostname(), sm.getPort());
    RpcEngine rpcEngine = null;
    try {
      rpcEngine = HBaseRPC.getProtocolEngine(conf);
      HMasterInterface inf = rpcEngine.getProxy(
          HMasterInterface.class,  HMasterInterface.VERSION, isa, conf, 100 * 10);
      inf.isMasterRunning();
      fail();
    } catch (RemoteException ex) {
      assertTrue(ex.getMessage().startsWith(
          "org.apache.hadoop.hbase.ipc.ServerNotRunningYetException: Server is not running yet"));
    } catch (Throwable t) {
      fail("Unexpected throwable: " + t);
    } finally {
      if (rpcEngine != null) {
        rpcEngine.close();
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.ipc.RpcEngine

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.