OmniSciDB  085a039ca4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
com.mapd.parser.server.CalciteServerWrapper Class Reference
+ Inheritance diagram for com.mapd.parser.server.CalciteServerWrapper:
+ Collaboration diagram for com.mapd.parser.server.CalciteServerWrapper:

Public Member Functions

 CalciteServerWrapper ()
 
 CalciteServerWrapper (int calcitePort, int heavyDBPort, String dataDir, String extensionFunctionsAstFile, SockTransportProperties client_skT, SockTransportProperties server_skT)
 
 CalciteServerWrapper (int calcitePort, int heavyDBPort, String dataDir, String extensionFunctionsAstFile, SockTransportProperties client_skT, SockTransportProperties server_skT, String userDefinedFunctionsFile)
 
void stopServer ()
 
void run ()
 

Package Functions

boolean shutdown ()
 

Private Member Functions

void startServer (ai.heavy.thrift.calciteserver.CalciteServer.Processor processor)
 

Private Attributes

final CalciteServerHandler handler
 
final Processor processor
 
TServer server
 
int heavyDBPort = 6274
 
String dataDir = ("data/")
 
int calcitePort = 6279
 
boolean shutdown = false
 
SockTransportProperties server_skT_
 

Static Private Attributes

static final Logger HEAVYDBLOGGER
 

Detailed Description

Author
michael

Definition at line 35 of file CalciteServerWrapper.java.

Constructor & Destructor Documentation

com.mapd.parser.server.CalciteServerWrapper.CalciteServerWrapper ( )
inline
com.mapd.parser.server.CalciteServerWrapper.CalciteServerWrapper ( int  calcitePort,
int  heavyDBPort,
String  dataDir,
String  extensionFunctionsAstFile,
SockTransportProperties  client_skT,
SockTransportProperties  server_skT 
)
inline

Definition at line 52 of file CalciteServerWrapper.java.

References com.mapd.parser.server.CalciteServerWrapper.calcitePort, com.mapd.parser.server.CalciteServerWrapper.handler, com.mapd.parser.server.CalciteServerWrapper.heavyDBPort, and com.mapd.parser.server.CalciteServerWrapper.processor.

57  {
58  handler = new CalciteServerHandler(
59  heavyDBPort, dataDir, extensionFunctionsAstFile, client_skT, "");
60  processor = new ai.heavy.thrift.calciteserver.CalciteServer.Processor(handler);
61  this.calcitePort = calcitePort;
62  this.heavyDBPort = heavyDBPort;
63  this.server_skT_ = server_skT;
64  }
com.mapd.parser.server.CalciteServerWrapper.CalciteServerWrapper ( int  calcitePort,
int  heavyDBPort,
String  dataDir,
String  extensionFunctionsAstFile,
SockTransportProperties  client_skT,
SockTransportProperties  server_skT,
String  userDefinedFunctionsFile 
)
inline

Definition at line 66 of file CalciteServerWrapper.java.

References com.mapd.parser.server.CalciteServerWrapper.calcitePort, com.mapd.parser.server.CalciteServerWrapper.handler, com.mapd.parser.server.CalciteServerWrapper.heavyDBPort, and com.mapd.parser.server.CalciteServerWrapper.processor.

72  {
73  handler = new CalciteServerHandler(heavyDBPort,
74  dataDir,
75  extensionFunctionsAstFile,
76  client_skT,
77  userDefinedFunctionsFile);
78  processor = new ai.heavy.thrift.calciteserver.CalciteServer.Processor(handler);
79  this.calcitePort = calcitePort;
80  this.heavyDBPort = heavyDBPort;
81  this.server_skT_ = server_skT;
82  try {
83  } catch (Exception e) {
84  e.printStackTrace();
85  }
86  }

Member Function Documentation

void com.mapd.parser.server.CalciteServerWrapper.run ( )
inline

Definition at line 115 of file CalciteServerWrapper.java.

References com.mapd.parser.server.CalciteServerWrapper.processor, and com.mapd.parser.server.CalciteServerWrapper.startServer().

115  {
117  }
void startServer(ai.heavy.thrift.calciteserver.CalciteServer.Processor processor)

+ Here is the call graph for this function:

boolean com.mapd.parser.server.CalciteServerWrapper.shutdown ( )
inlinepackage

Definition at line 119 of file CalciteServerWrapper.java.

Referenced by com.mapd.parser.server.CalciteServerWrapper.startServer(), and com.mapd.parser.server.CalciteServerWrapper.stopServer().

119  {
120  return shutdown;
121  }

+ Here is the caller graph for this function:

void com.mapd.parser.server.CalciteServerWrapper.startServer ( ai.heavy.thrift.calciteserver.CalciteServer.Processor  processor)
inlineprivate

Definition at line 88 of file CalciteServerWrapper.java.

References com.mapd.parser.server.CalciteServerWrapper.calcitePort, com.mapd.parser.server.CalciteServerWrapper.heavyDBPort, com.mapd.parser.server.CalciteServerWrapper.processor, com.mapd.parser.server.CalciteServerWrapper.server, and com.mapd.parser.server.CalciteServerWrapper.shutdown().

Referenced by com.mapd.parser.server.CalciteServerWrapper.run().

89  {
90  try {
91  TServerTransport serverTransport = server_skT_.openServerTransport(calcitePort);
92  server = new TThreadPoolServer(
93  new TThreadPoolServer.Args(serverTransport).processor(processor));
94 
95  HEAVYDBLOGGER.debug("Starting a threaded pool server... Listening on port "
96  + calcitePort + " HEAVY.AI on port " + heavyDBPort);
97  handler.setServer(server);
98  server.serve();
99  // we have been told to shut down (only way to get to this piece of code
100  shutdown = true;
101 
102  } catch (Exception e) {
103  e.printStackTrace();
104  HEAVYDBLOGGER.error(" Calcite server Failed to start ");
105  shutdown = true;
106  }
107  }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void com.mapd.parser.server.CalciteServerWrapper.stopServer ( )
inline

Definition at line 109 of file CalciteServerWrapper.java.

References com.mapd.parser.server.CalciteServerWrapper.shutdown().

109  {
110  server.stop();
111  shutdown = true;
112  }

+ Here is the call graph for this function:

Member Data Documentation

int com.mapd.parser.server.CalciteServerWrapper.calcitePort = 6279
private
String com.mapd.parser.server.CalciteServerWrapper.dataDir = ("data/")
private
final CalciteServerHandler com.mapd.parser.server.CalciteServerWrapper.handler
private
final Logger com.mapd.parser.server.CalciteServerWrapper.HEAVYDBLOGGER
staticprivate
Initial value:
=
LoggerFactory.getLogger(CalciteServerWrapper.class)

Definition at line 36 of file CalciteServerWrapper.java.

int com.mapd.parser.server.CalciteServerWrapper.heavyDBPort = 6274
private
final Processor com.mapd.parser.server.CalciteServerWrapper.processor
private
TServer com.mapd.parser.server.CalciteServerWrapper.server
private
SockTransportProperties com.mapd.parser.server.CalciteServerWrapper.server_skT_
private

Definition at line 45 of file CalciteServerWrapper.java.

boolean com.mapd.parser.server.CalciteServerWrapper.shutdown = false
private

The documentation for this class was generated from the following file: