FacebookService.Processor processor = new ThriftHiveMetastore.Processor(
handler);
TThreadPoolServer.Options options = new TThreadPoolServer.Options();
options.minWorkerThreads = minWorkerThreads;
options.maxWorkerThreads = maxWorkerThreads;
TServer server = new TThreadPoolServer(processor, serverTransport,
new TTransportFactory(), new TTransportFactory(),
new TBinaryProtocol.Factory(), new TBinaryProtocol.Factory(), options);
HMSHandler.LOG.info("Started the new metaserver on port [" + port
+ "]...");
HMSHandler.LOG.info("Options.minWorkerThreads = "
+ options.minWorkerThreads);
HMSHandler.LOG.info("Options.maxWorkerThreads = "
+ options.maxWorkerThreads);
HMSHandler.LOG.info("TCP keepalive = " + tcpKeepAlive);
server.serve();
} catch (Throwable x) {
x.printStackTrace();
HMSHandler.LOG
.error("Metastore Thrift Server threw an exception. Exiting...");
HMSHandler.LOG.error(StringUtils.stringifyException(x));