/** * Start up the Thrift2 server. */ public static void main(String[] args) throws Exception { final Configuration conf = HBaseConfiguration.create(); // for now, only time we return is on an argument error. final int status = ToolRunner.run(conf, new ThriftServer(conf), args); System.exit(status); }
@Override protected ThriftServer createThriftServer() { return new ThriftServer(TEST_UTIL.getConfiguration()); }
@Override protected ThriftServer createThriftServer() { return new ThriftServer(TEST_UTIL.getConfiguration()); }
private static ThriftServer startThriftServer(int port, boolean useHttp) { Configuration thriftServerConf = HBaseConfiguration.create(TEST_UTIL.getConfiguration()); thriftServerConf.setInt(Constants.PORT_CONF_KEY, port); if (useHttp) { thriftServerConf.setBoolean(Constants.USE_HTTP_CONF_KEY, true); } ThriftServer server = new ThriftServer(thriftServerConf); Thread thriftServerThread = new Thread(() -> { try{ server.run(); } catch (Exception t) { LOG.error("Thrift Server failed", t); } }); thriftServerThread.setDaemon(true); thriftServerThread.start(); if (useHttp) { TEST_UTIL.waitFor(10000, () -> server.getHttpServer() != null); } else { TEST_UTIL.waitFor(10000, () -> server.getTserver() != null); } return server; }
/** * Start up the Thrift2 server. */ public static void main(String[] args) throws Exception { final Configuration conf = HBaseConfiguration.create(); // for now, only time we return is on an argument error. final int status = ToolRunner.run(conf, new ThriftServer(), args); System.exit(status); }
/** * Start up the Thrift2 server. */ public static void main(String[] args) throws Exception { final Configuration conf = HBaseConfiguration.create(); // for now, only time we return is on an argument error. final int status = ToolRunner.run(conf, new ThriftServer(), args); System.exit(status); }