Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::InProcessImpalaServer Class Reference

#include <in-process-servers.h>

Collaboration diagram for impala::InProcessImpalaServer:

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 ()
 
ImpalaServerimpala_server ()
 
MetricGroupmetrics ()
 
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...
 
ImpalaServerimpala_server_
 
boost::scoped_ptr< ExecEnvexec_env_
 ExecEnv holds much of the per-service state. More...
 
boost::scoped_ptr< ThriftServerbe_server_
 Backend Thrift server. More...
 
boost::scoped_ptr< ThriftServerhs2_server_
 Frontend HiveServer2 server. More...
 
boost::scoped_ptr< ThriftServerbeeswax_server_
 Frontend Beeswax server. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Member Function Documentation

ImpalaServer* impala::InProcessImpalaServer::impala_server ( )
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.

MetricGroup* impala::InProcessImpalaServer::metrics ( )
inline

Definition at line 62 of file in-process-servers.h.

References exec_env_.

Referenced by TEST().

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

Status InProcessImpalaServer::StartAsBackendOnly ( bool  use_statestore)

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

Referenced by main(), and TEST().

Member Data Documentation

const uint32_t impala::InProcessImpalaServer::backend_port_
private

Port to start the backend server on.

Definition at line 73 of file in-process-servers.h.

Referenced by StartAsBackendOnly(), and StartWithClientServers().

boost::scoped_ptr<ThriftServer> impala::InProcessImpalaServer::be_server_
private

Backend Thrift server.

Definition at line 84 of file in-process-servers.h.

Referenced by Join(), StartAsBackendOnly(), and StartWithClientServers().

boost::scoped_ptr<ThriftServer> impala::InProcessImpalaServer::beeswax_server_
private

Frontend Beeswax server.

Definition at line 90 of file in-process-servers.h.

Referenced by StartWithClientServers().

boost::scoped_ptr<ExecEnv> impala::InProcessImpalaServer::exec_env_
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().

const std::string impala::InProcessImpalaServer::hostname_
private

Hostname for this server, usually FLAGS_hostname.

Definition at line 70 of file in-process-servers.h.

Referenced by StartWithClientServers().

boost::scoped_ptr<ThriftServer> impala::InProcessImpalaServer::hs2_server_
private

Frontend HiveServer2 server.

Definition at line 87 of file in-process-servers.h.

Referenced by StartWithClientServers().

ImpalaServer* impala::InProcessImpalaServer::impala_server_
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().


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