|
Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <thrift-client.h>
Public Member Functions | |
| ThriftClient (const std::string &ipaddress, int port, const std::string &service_name="", AuthProvider *auth_provider=NULL, bool ssl=false) | |
| InterfaceType * | iface () |
| Returns the object used to actually make RPCs against the remote server. More... | |
| 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 | |
| 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_ |
Private Attributes | |
| boost::shared_ptr< InterfaceType > | iface_ |
| AuthProvider * | auth_provider_ |
Utility client to a Thrift server. The parameter type is the Thrift interface type that the server implements. TODO: Consider a builder class to make constructing this class easier.
Definition at line 100 of file thrift-client.h.
| impala::ThriftClient< InterfaceType >::ThriftClient | ( | const std::string & | ipaddress, |
| int | port, | ||
| const std::string & | service_name = "", |
||
| AuthProvider * | auth_provider = NULL, |
||
| bool | ssl = false |
||
| ) |
Creates, but does not connect, a new ThriftClient for a remote server.
Definition at line 123 of file thrift-client.h.
References impala::ThriftClientImpl::address_, impala::ThriftClient< InterfaceType >::auth_provider_, impala::AuthManager::GetInstance(), impala::AuthManager::GetInternalAuthProvider(), impala::ThriftClient< InterfaceType >::iface_, impala::ThriftClientImpl::protocol_, impala::ThriftClientImpl::socket_, impala::ThriftClientImpl::transport_, and impala::AuthProvider::WrapClientTransport().
|
inlineinherited |
Definition at line 48 of file thrift-client.h.
References impala::ThriftClientImpl::address_.
|
inherited |
Close the connection with the remote server. May be called repeatedly.
Definition at line 69 of file thrift-client.cc.
Referenced by impala::ThriftClientImpl::~ThriftClientImpl().
|
protectedinherited |
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 impala::ThriftClientImpl::ThriftClientImpl().
|
inline |
Returns the object used to actually make RPCs against the remote server.
Definition at line 114 of file thrift-client.h.
References impala::ThriftClient< InterfaceType >::iface_.
Referenced by main(), impala::ClientCache< T >::MakeClient(), and Send().
|
inherited |
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().
|
inlineinherited |
Set receive timeout on the underlying TSocket.
Definition at line 62 of file thrift-client.h.
References impala::ThriftClientImpl::socket_.
|
inlineinherited |
Set send timeout on the underlying TSocket.
Definition at line 65 of file thrift-client.h.
References impala::ThriftClientImpl::socket_.
|
protectedinherited |
Address of the server this client communicates with.
Definition at line 78 of file thrift-client.h.
Referenced by impala::ThriftClientImpl::address(), and impala::ThriftClient< InterfaceType >::ThriftClient().
|
private |
Definition at line 119 of file thrift-client.h.
Referenced by impala::ThriftClient< InterfaceType >::ThriftClient().
|
private |
Definition at line 117 of file thrift-client.h.
Referenced by impala::ThriftClient< InterfaceType >::iface(), and impala::ThriftClient< InterfaceType >::ThriftClient().
|
protectedinherited |
Definition at line 92 of file thrift-client.h.
Referenced by impala::ThriftClient< InterfaceType >::ThriftClient().
|
protectedinherited |
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.
|
protectedinherited |
All shared pointers, because Thrift requires them to be.
Definition at line 90 of file thrift-client.h.
Referenced by impala::ThriftClientImpl::setRecvTimeout(), impala::ThriftClientImpl::setSendTimeout(), and impala::ThriftClient< InterfaceType >::ThriftClient().
|
protectedinherited |
Definition at line 83 of file thrift-client.h.
Referenced by impala::ThriftClientImpl::ThriftClientImpl().
|
protectedinherited |
True if ssl encryption is enabled on this connection.
Definition at line 81 of file thrift-client.h.
|
protectedinherited |
Definition at line 91 of file thrift-client.h.
Referenced by impala::ThriftClient< InterfaceType >::ThriftClient().