Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Super class for templatized thrift clients. More...
#include <thrift-client.h>
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::TSasl > | sasl_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_ |
Super class for templatized thrift clients.
Definition at line 42 of file thrift-client.h.
|
inline |
Definition at line 44 of file thrift-client.h.
References Close().
|
inlineprotected |
Definition at line 68 of file thrift-client.h.
References CreateSocket(), and socket_create_status_.
|
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().
|
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().
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().
|
inline |
Set receive timeout on the underlying TSocket.
Definition at line 62 of file thrift-client.h.
References socket_.
|
inline |
Set send timeout on the underlying TSocket.
Definition at line 65 of file thrift-client.h.
References socket_.
|
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().
|
protected |
Definition at line 92 of file thrift-client.h.
Referenced by impala::ThriftClient< InterfaceType >::ThriftClient().
|
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.
|
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().
|
protected |
Definition at line 83 of file thrift-client.h.
Referenced by ThriftClientImpl().
|
protected |
True if ssl encryption is enabled on this connection.
Definition at line 81 of file thrift-client.h.
|
protected |
Definition at line 91 of file thrift-client.h.
Referenced by impala::ThriftClient< InterfaceType >::ThriftClient().