OmniSciDB  04ee39c94c
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

◆ CalciteServerWrapper() [1/3]

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

Definition at line 46 of file CalciteServerWrapper.java.

46  {
47  handler = new CalciteServerHandler(mapDPort, dataDir, null, null, "");
48  processor = new com.mapd.thrift.calciteserver.CalciteServer.Processor(handler);
49  }

◆ CalciteServerWrapper() [2/3]

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

◆ CalciteServerWrapper() [3/3]

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, and com.mapd.parser.server.CalciteServerWrapper.mapDPort.

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

◆ run()

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

Definition at line 114 of file CalciteServerWrapper.java.

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

Referenced by com.mapd.parser.server.CalciteServerCaller.doWork().

114  {
116  }
void startServer(com.mapd.thrift.calciteserver.CalciteServer.Processor processor)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shutdown()

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

Definition at line 118 of file CalciteServerWrapper.java.

118  {
119  return shutdown;
120  }

◆ startServer()

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.common.SockTransportProperties.openServerTransport(), and com.mapd.parser.server.CalciteServerHandler.setServer().

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);
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:

◆ stopServer()

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

Definition at line 108 of file CalciteServerWrapper.java.

Referenced by com.mapd.parser.server.test.TestServer.stopServer().

+ Here is the caller graph for this function:

Member Data Documentation

◆ calcitePort

int com.mapd.parser.server.CalciteServerWrapper.calcitePort = 6279
private

◆ dataDir

String com.mapd.parser.server.CalciteServerWrapper.dataDir = ("data/")
private

Definition at line 41 of file CalciteServerWrapper.java.

◆ handler

final CalciteServerHandler com.mapd.parser.server.CalciteServerWrapper.handler
private

Definition at line 37 of file CalciteServerWrapper.java.

◆ MAPDLOGGER

final Logger com.mapd.parser.server.CalciteServerWrapper.MAPDLOGGER
staticprivate
Initial value:
=
LoggerFactory.getLogger(CalciteServerWrapper.class)

Definition at line 35 of file CalciteServerWrapper.java.

◆ mapDPort

int com.mapd.parser.server.CalciteServerWrapper.mapDPort = 6274
private

◆ processor

final Processor com.mapd.parser.server.CalciteServerWrapper.processor
private

Definition at line 38 of file CalciteServerWrapper.java.

◆ server

TServer com.mapd.parser.server.CalciteServerWrapper.server
private

Definition at line 39 of file CalciteServerWrapper.java.

◆ server_skT_

SockTransportProperties com.mapd.parser.server.CalciteServerWrapper.server_skT_
private

Definition at line 44 of file CalciteServerWrapper.java.

◆ shutdown

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

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