Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <in-process-servers.h>
Public Member Functions | |
InProcessImpalaServer (const std::string &hostname, int backend_port, int subscriber_port, int webserver_port, const std::string &statestore_host, int statestore_port) | |
Status | StartWithClientServers (int beeswax_port, int hs2_port, bool use_statestore) |
Status | StartAsBackendOnly (bool use_statestore) |
Status | Join () |
ImpalaServer * | impala_server () |
MetricGroup * | metrics () |
void | SetCatalogInitialized () |
Private Attributes | |
const std::string | hostname_ |
Hostname for this server, usually FLAGS_hostname. More... | |
const uint32_t | backend_port_ |
Port to start the backend server on. More... | |
ImpalaServer * | impala_server_ |
boost::scoped_ptr< ExecEnv > | exec_env_ |
ExecEnv holds much of the per-service state. More... | |
boost::scoped_ptr< ThriftServer > | be_server_ |
Backend Thrift server. More... | |
boost::scoped_ptr< ThriftServer > | hs2_server_ |
Frontend HiveServer2 server. More... | |
boost::scoped_ptr< ThriftServer > | beeswax_server_ |
Frontend Beeswax server. More... | |
A single impala service, with a backend server, two client servers, a webserver and optionally a connection to a statestore. TODO: Static StartCluster method which runs one or more ImpalaServer(s) and an optional Statestore. TODO: Fix occasional abort when object is destroyed.
Definition at line 39 of file in-process-servers.h.
InProcessImpalaServer::InProcessImpalaServer | ( | const std::string & | hostname, |
int | backend_port, | ||
int | subscriber_port, | ||
int | webserver_port, | ||
const std::string & | statestore_host, | ||
int | statestore_port | ||
) |
Initialises the server, but does not start any network-attached services or run any threads.
Definition at line 32 of file in-process-servers.cc.
|
inline |
Definition at line 60 of file in-process-servers.h.
References impala_server_.
Status InProcessImpalaServer::Join | ( | ) |
Blocks until the backend server exits. Returns Status::OK unless there was an error joining.
Definition at line 79 of file in-process-servers.cc.
References be_server_, and impala::Status::OK.
|
inline |
void InProcessImpalaServer::SetCatalogInitialized | ( | ) |
Sets the catalog on this impalad to be initialized. If we don't start up a catalogd, then there is no one to initialize it otherwise.
Definition at line 41 of file in-process-servers.cc.
References exec_env_, and impala_server_.
Referenced by main().
Starts only the backend server; useful when running a cluster of InProcessImpalaServers and only one is to serve client requests.
Definition at line 69 of file in-process-servers.cc.
References backend_port_, be_server_, impala::CreateImpalaServer(), exec_env_, impala_server_, impala::Status::OK, and RETURN_IF_ERROR.
Status InProcessImpalaServer::StartWithClientServers | ( | int | beeswax_port, |
int | hs2_port, | ||
bool | use_statestore | ||
) |
Starts all servers, including the beeswas and hs2 client servers. If use_statestore is set, a connection to the statestore is established. If there is no error, returns Status::OK.
Definition at line 46 of file in-process-servers.cc.
References backend_port_, be_server_, beeswax_server_, impala::CreateImpalaServer(), exec_env_, hostname_, hs2_server_, impala_server_, impala::Status::OK, RETURN_IF_ERROR, and impala::WaitForServer().
|
private |
Port to start the backend server on.
Definition at line 73 of file in-process-servers.h.
Referenced by StartAsBackendOnly(), and StartWithClientServers().
|
private |
Backend Thrift server.
Definition at line 84 of file in-process-servers.h.
Referenced by Join(), StartAsBackendOnly(), and StartWithClientServers().
|
private |
Frontend Beeswax server.
Definition at line 90 of file in-process-servers.h.
Referenced by StartWithClientServers().
|
private |
ExecEnv holds much of the per-service state.
Definition at line 81 of file in-process-servers.h.
Referenced by metrics(), SetCatalogInitialized(), StartAsBackendOnly(), and StartWithClientServers().
|
private |
Hostname for this server, usually FLAGS_hostname.
Definition at line 70 of file in-process-servers.h.
Referenced by StartWithClientServers().
|
private |
Frontend HiveServer2 server.
Definition at line 87 of file in-process-servers.h.
Referenced by StartWithClientServers().
|
private |
The ImpalaServer that handles client and backend requests. Not owned by this class; instead it's owned via shared_ptrs in the ThriftServers. See CreateImpalaServer for details.
Definition at line 78 of file in-process-servers.h.
Referenced by impala_server(), SetCatalogInitialized(), StartAsBackendOnly(), and StartWithClientServers().