thriftCLIService = new ThriftHttpCLIService(cliService, oomHook); } else { thriftCLIService = new ThriftBinaryCLIService(cliService, oomHook);
final String httpPath = getHttpPath(hiveConf.getVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_HTTP_PATH));
ServletContextHandler.SESSIONS); context.setContextPath("/"); String httpPath = getHttpPath(hiveConf .getVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_HTTP_PATH)); httpServer.setHandler(context);
@Override public synchronized void init(HiveConf hiveConf) { cliService = new CLIService(this); addService(cliService); if (isHTTPTransportMode(hiveConf)) { thriftCLIService = new ThriftHttpCLIService(cliService); } else { thriftCLIService = new ThriftBinaryCLIService(cliService); } addService(thriftCLIService); super.init(hiveConf); // Add a shutdown hook for catching SIGTERM & SIGINT final HiveServer2 hiveServer2 = this; Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { hiveServer2.stop(); } }); }
ServletContextHandler.SESSIONS); context.setContextPath("/"); String httpPath = getHttpPath(hiveConf .getVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_HTTP_PATH)); httpServer.setHandler(context);
@Override public synchronized void init(HiveConf hiveConf) { cliService = new CLIService(this); addService(cliService); if (isHTTPTransportMode(hiveConf)) { thriftCLIService = new ThriftHttpCLIService(cliService); } else { thriftCLIService = new ThriftBinaryCLIService(cliService); } addService(thriftCLIService); super.init(hiveConf); // Add a shutdown hook for catching SIGTERM & SIGINT final HiveServer2 hiveServer2 = this; Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { hiveServer2.stop(); } }); }
final String httpPath = getHttpPath(hiveConf.getVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_HTTP_PATH));
@Override public synchronized void init(HiveConf hiveConf) { cliService = new CLIService(this); addService(cliService); if (isHTTPTransportMode(hiveConf)) { thriftCLIService = new ThriftHttpCLIService(cliService); } else { thriftCLIService = new ThriftBinaryCLIService(cliService); } addService(thriftCLIService); super.init(hiveConf); // Add a shutdown hook for catching SIGTERM & SIGINT // this must be higher than the Hadoop Filesystem priority of 10, // which the default priority is. // The signature of the callback must match that of a scala () -> Unit // function ShutdownHookManager.addShutdownHook( new AbstractFunction0<BoxedUnit>() { public BoxedUnit apply() { try { LOG.info("Hive Server Shutdown hook invoked"); stop(); } catch (Throwable e) { LOG.warn("Ignoring Exception while stopping Hive Server from shutdown hook", e); } return BoxedUnit.UNIT; } }); }
ServletContextHandler.SESSIONS); context.setContextPath("/"); String httpPath = getHttpPath(hiveConf .getVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_HTTP_PATH)); httpServer.setHandler(context);
@Override public synchronized void init(HiveConf hiveConf) { cliService = new CLIService(this); addService(cliService); if (isHTTPTransportMode(hiveConf)) { thriftCLIService = new ThriftHttpCLIService(cliService); } else { thriftCLIService = new ThriftBinaryCLIService(cliService); } addService(thriftCLIService); super.init(hiveConf); // Add a shutdown hook for catching SIGTERM & SIGINT // this must be higher than the Hadoop Filesystem priority of 10, // which the default priority is. // The signature of the callback must match that of a scala () -> Unit // function ShutdownHookManager.addShutdownHook( new AbstractFunction0<BoxedUnit>() { public BoxedUnit apply() { try { LOG.info("Hive Server Shutdown hook invoked"); stop(); } catch (Throwable e) { LOG.warn("Ignoring Exception while stopping Hive Server from shutdown hook", e); } return BoxedUnit.UNIT; } }); }
ServletContextHandler.SESSIONS); context.setContextPath("/"); String httpPath = getHttpPath(hiveConf .getVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_HTTP_PATH)); httpServer.setHandler(context);
thriftCLIService = new ThriftHttpCLIService(cliService, oomHook); } else { thriftCLIService = new ThriftBinaryCLIService(cliService, oomHook);