OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 mapDPort, String dataDir, String extensionFunctionsAstFile, SockTransportProperties client_skT, SockTransportProperties server_skT)
 
 CalciteServerWrapper (int calcitePort, int mapDPort, 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 (com.mapd.thrift.calciteserver.CalciteServer.Processor processor)
 

Private Attributes

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

Static Private Attributes

static final Logger MAPDLOGGER
 

Detailed Description

Author
michael

Definition at line 34 of file CalciteServerWrapper.java.

Constructor & Destructor Documentation

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

Definition at line 51 of file CalciteServerWrapper.java.

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

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

Definition at line 65 of file CalciteServerWrapper.java.

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

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

Member Function Documentation

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

Definition at line 114 of file CalciteServerWrapper.java.

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

114  {
116  }
void startServer(com.mapd.thrift.calciteserver.CalciteServer.Processor processor)

+ Here is the call graph for this function:

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

Definition at line 118 of file CalciteServerWrapper.java.

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

118  {
119  return shutdown;
120  }

+ Here is the caller graph for this function:

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

Definition at line 87 of file CalciteServerWrapper.java.

References com.mapd.parser.server.CalciteServerWrapper.calcitePort, com.mapd.parser.server.CalciteServerWrapper.mapDPort, 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().

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

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

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

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

+ 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.MAPDLOGGER
staticprivate
Initial value:
=
LoggerFactory.getLogger(CalciteServerWrapper.class)

Definition at line 35 of file CalciteServerWrapper.java.

int com.mapd.parser.server.CalciteServerWrapper.mapDPort = 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 44 of file CalciteServerWrapper.java.

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

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