本文整理了Java中org.apache.hive.service.server.HiveServer2.addService()
方法的一些代码示例,展示了HiveServer2.addService()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HiveServer2.addService()
方法的具体详情如下:
包路径:org.apache.hive.service.server.HiveServer2
类名称:HiveServer2
方法名:addService
暂无
代码示例来源:origin: apache/hive
addService(cliService);
final HiveServer2 hiveServer2 = this;
Runnable oomHook = new Runnable() {
thriftCLIService = new ThriftBinaryCLIService(cliService, oomHook);
addService(thriftCLIService);
super.init(hiveConf);
代码示例来源:origin: com.github.hyukjinkwon/hive-service
@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();
}
});
}
代码示例来源:origin: org.spark-project.hive/hive-service
@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();
}
});
}
代码示例来源:origin: org.apache.spark/spark-hive-thriftserver
@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;
}
});
}
代码示例来源:origin: org.apache.spark/spark-hive-thriftserver_2.11
@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;
}
});
}
代码示例来源:origin: org.apache.hive/hive-service
addService(cliService);
final HiveServer2 hiveServer2 = this;
Runnable oomHook = new Runnable() {
thriftCLIService = new ThriftBinaryCLIService(cliService, oomHook);
addService(thriftCLIService);
super.init(hiveConf);
内容来源于网络,如有侵权,请联系作者删除!