TServerTransport serverTransport = new TServerSocket(port);
Iface handler = new HMSHandler("new db based metaserver");
FacebookService.Processor processor = new ThriftHiveMetastore.Processor(handler);
TThreadPoolServer.Options options = new TThreadPoolServer.Options();
options.minWorkerThreads = 200;
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);
server.serve();
} catch (Exception x) {
x.printStackTrace();
}
}