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

Super class for templatized thrift clients. More...

#include <thrift-client.h>

Inheritance diagram for impala::ThriftClientImpl:
Collaboration diagram for impala::ThriftClientImpl:

Public Member Functions

 ~ThriftClientImpl ()
 
const TNetworkAddress & address () const
 
Status Open ()
 
Status OpenWithRetry (uint32_t num_retries, uint64_t wait_ms)
 
void Close ()
 Close the connection with the remote server. May be called repeatedly. More...
 
void setRecvTimeout (int32_t ms)
 Set receive timeout on the underlying TSocket. More...
 
void setSendTimeout (int32_t ms)
 Set send timeout on the underlying TSocket. More...
 

Protected Member Functions

 ThriftClientImpl (const std::string &ipaddress, int port, bool ssl)
 
Status CreateSocket ()
 

Protected Attributes

TNetworkAddress address_
 Address of the server this client communicates with. More...
 
bool ssl_
 True if ssl encryption is enabled on this connection. More...
 
Status socket_create_status_
 
boost::shared_ptr< sasl::TSaslsasl_client_
 
boost::shared_ptr
< apache::thrift::transport::TSocket > 
socket_
 All shared pointers, because Thrift requires them to be. More...
 
boost::shared_ptr
< apache::thrift::transport::TTransport > 
transport_
 
boost::shared_ptr
< apache::thrift::protocol::TBinaryProtocol > 
protocol_
 

Detailed Description

Super class for templatized thrift clients.

Definition at line 42 of file thrift-client.h.

Constructor & Destructor Documentation

impala::ThriftClientImpl::~ThriftClientImpl ( )
inline

Definition at line 44 of file thrift-client.h.

References Close().

impala::ThriftClientImpl::ThriftClientImpl ( const std::string &  ipaddress,
int  port,
bool  ssl 
)
inlineprotected

Definition at line 68 of file thrift-client.h.

References CreateSocket(), and socket_create_status_.

Member Function Documentation

const TNetworkAddress& impala::ThriftClientImpl::address ( ) const
inline

Definition at line 48 of file thrift-client.h.

References address_.

void impala::ThriftClientImpl::Close ( )

Close the connection with the remote server. May be called repeatedly.

Definition at line 69 of file thrift-client.cc.

Referenced by ~ThriftClientImpl().

Status impala::ThriftClientImpl::CreateSocket ( )
protected

Create a new socket without opening it. Returns an error if the socket could not be created.

Definition at line 86 of file thrift-client.cc.

References impala::OK.

Referenced by ThriftClientImpl().

Status impala::ThriftClientImpl::Open ( )

Open the connection to the remote server. May be called repeatedly, is idempotent unless there is a failure to connect.

Definition at line 35 of file thrift-client.cc.

References impala::OK.

Referenced by HandleBroadcast(), HandleSend(), and main().

Status impala::ThriftClientImpl::OpenWithRetry ( uint32_t  num_retries,
uint64_t  wait_ms 
)

Retry the Open num_retries time waiting wait_ms milliseconds between retries. If num_retries == 0, the connection is retried indefinitely.

Definition at line 48 of file thrift-client.cc.

References impala::Status::ok(), and impala::SleepForMs().

void impala::ThriftClientImpl::setRecvTimeout ( int32_t  ms)
inline

Set receive timeout on the underlying TSocket.

Definition at line 62 of file thrift-client.h.

References socket_.

void impala::ThriftClientImpl::setSendTimeout ( int32_t  ms)
inline

Set send timeout on the underlying TSocket.

Definition at line 65 of file thrift-client.h.

References socket_.

Member Data Documentation

TNetworkAddress impala::ThriftClientImpl::address_
protected

Address of the server this client communicates with.

Definition at line 78 of file thrift-client.h.

Referenced by address(), and impala::ThriftClient< InterfaceType >::ThriftClient().

boost::shared_ptr<apache::thrift::protocol::TBinaryProtocol> impala::ThriftClientImpl::protocol_
protected

Definition at line 92 of file thrift-client.h.

Referenced by impala::ThriftClient< InterfaceType >::ThriftClient().

boost::shared_ptr<sasl::TSasl> impala::ThriftClientImpl::sasl_client_
protected

Sasl Client object. Contains client kerberos identification data. Will be NULL if kerberos is not being used.

Definition at line 87 of file thrift-client.h.

boost::shared_ptr<apache::thrift::transport::TSocket> impala::ThriftClientImpl::socket_
protected

All shared pointers, because Thrift requires them to be.

Definition at line 90 of file thrift-client.h.

Referenced by setRecvTimeout(), setSendTimeout(), and impala::ThriftClient< InterfaceType >::ThriftClient().

Status impala::ThriftClientImpl::socket_create_status_
protected

Definition at line 83 of file thrift-client.h.

Referenced by ThriftClientImpl().

bool impala::ThriftClientImpl::ssl_
protected

True if ssl encryption is enabled on this connection.

Definition at line 81 of file thrift-client.h.

boost::shared_ptr<apache::thrift::transport::TTransport> impala::ThriftClientImpl::transport_
protected

Definition at line 91 of file thrift-client.h.

Referenced by impala::ThriftClient< InterfaceType >::ThriftClient().


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