OmniSciDB  a5dc49c757
 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

Definition at line 32 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 49 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.

54  {
55  handler = new CalciteServerHandler(
56  heavyDBPort, dataDir, extensionFunctionsAstFile, client_skT, "");
57  processor = new ai.heavy.thrift.calciteserver.CalciteServer.Processor(handler);
58  this.calcitePort = calcitePort;
59  this.heavyDBPort = heavyDBPort;
60  this.server_skT_ = server_skT;
61  }
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 63 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.

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

Member Function Documentation

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

Definition at line 112 of file CalciteServerWrapper.java.

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

112  {
114  }
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 116 of file CalciteServerWrapper.java.

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

116  {
117  return shutdown;
118  }

+ 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 85 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().

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

+ 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 106 of file CalciteServerWrapper.java.

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

106  {
107  server.stop();
108  shutdown = true;
109  }

+ 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 33 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 42 of file CalciteServerWrapper.java.

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

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