17 package com.mapd.parser.server;
21 import org.apache.thrift.server.TServer;
22 import org.apache.thrift.server.TThreadPoolServer;
23 import org.apache.thrift.transport.TSSLTransportFactory;
24 import org.apache.thrift.transport.TSSLTransportFactory.TSSLTransportParameters;
25 import org.apache.thrift.transport.TServerSocket;
26 import org.apache.thrift.transport.TServerTransport;
27 import org.slf4j.Logger;
28 import org.slf4j.LoggerFactory;
30 import ai.heavy.thrift.calciteserver.CalciteServer.Processor;
34 LoggerFactory.getLogger(CalciteServerWrapper.class);
46 processor =
new ai.heavy.thrift.calciteserver.CalciteServer.Processor(
handler);
52 String extensionFunctionsAstFile,
56 heavyDBPort, dataDir, extensionFunctionsAstFile, client_skT,
"");
57 processor =
new ai.heavy.thrift.calciteserver.CalciteServer.Processor(
handler);
60 this.server_skT_ = server_skT;
66 String extensionFunctionsAstFile,
69 String userDefinedFunctionsFile) {
72 extensionFunctionsAstFile,
74 userDefinedFunctionsFile);
75 processor =
new ai.heavy.thrift.calciteserver.CalciteServer.Processor(
handler);
78 this.server_skT_ = server_skT;
80 }
catch (Exception e) {
86 ai.heavy.thrift.calciteserver.CalciteServer.Processor
processor) {
88 TServerTransport serverTransport = server_skT_.openServerTransport(
calcitePort);
89 server =
new TThreadPoolServer(
90 new TThreadPoolServer.Args(serverTransport).processor(
processor));
92 HEAVYDBLOGGER.debug(
"Starting a threaded pool server... Listening on port "
99 }
catch (Exception e) {
101 HEAVYDBLOGGER.error(
" Calcite server Failed to start ");
CalciteServerWrapper(int calcitePort, int heavyDBPort, String dataDir, String extensionFunctionsAstFile, SockTransportProperties client_skT, SockTransportProperties server_skT, String userDefinedFunctionsFile)
final CalciteServerHandler handler
CalciteServerWrapper(int calcitePort, int heavyDBPort, String dataDir, String extensionFunctionsAstFile, SockTransportProperties client_skT, SockTransportProperties server_skT)
void startServer(ai.heavy.thrift.calciteserver.CalciteServer.Processor processor)
SockTransportProperties server_skT_
static final Logger HEAVYDBLOGGER
final Processor processor