Kudu C++ client API
|
A "factory" for KuduClient objects. More...
#include <client.h>
Public Member Functions | |
KuduClientBuilder & | clear_master_server_addrs () |
KuduClientBuilder & | master_server_addrs (const std::vector< std::string > &addrs) |
KuduClientBuilder & | add_master_server_addr (const std::string &addr) |
KuduClientBuilder & | default_admin_operation_timeout (const MonoDelta &timeout) |
KuduClientBuilder & | default_rpc_timeout (const MonoDelta &timeout) |
KuduClientBuilder & | import_authentication_credentials (std::string authn_creds) |
KuduClientBuilder & | num_reactors (int num_reactors) |
Set the number of reactors for the RPC messenger. More... | |
Status | Build (sp::shared_ptr< KuduClient > *client) |
A "factory" for KuduClient objects.
This class is used to create instances of the KuduClient class with pre-set options/parameters.
KuduClientBuilder& kudu::client::KuduClientBuilder::add_master_server_addr | ( | const std::string & | addr | ) |
Add an RPC address of a master to work with.
At least one master is required.
[in] | addr | RPC address of master server to add. |
Status kudu::client::KuduClientBuilder::Build | ( | sp::shared_ptr< KuduClient > * | client | ) |
Create a client object.
[out] | client | The newly created object wrapped in a shared pointer. |
KuduClientBuilder& kudu::client::KuduClientBuilder::clear_master_server_addrs | ( | ) |
Clear the set of master addresses.
KuduClientBuilder& kudu::client::KuduClientBuilder::default_admin_operation_timeout | ( | const MonoDelta & | timeout | ) |
Set the default timeout for administrative operations.
Using this method it is possible to modify the default timeout for operations like CreateTable, AlterTable, etc. By default it is 30 seconds.
[in] | timeout | Timeout value to set. |
KuduClientBuilder& kudu::client::KuduClientBuilder::default_rpc_timeout | ( | const MonoDelta & | timeout | ) |
Set the default timeout for individual RPCs.
If not provided, defaults to 10 seconds.
[in] | timeout | Timeout value to set. |
KuduClientBuilder& kudu::client::KuduClientBuilder::import_authentication_credentials | ( | std::string | authn_creds | ) |
Import serialized authentication credentials from another client.
[in] | authn_creds | The serialized authentication credentials, provided by a call to KuduClient.ExportAuthenticationCredentials in the C++ client or KuduClient::exportAuthenticationCredentials in the Java client. |
KuduClientBuilder& kudu::client::KuduClientBuilder::master_server_addrs | ( | const std::vector< std::string > & | addrs | ) |
Add RPC addresses of multiple masters.
[in] | addrs | RPC addresses of masters to add. |
KuduClientBuilder& kudu::client::KuduClientBuilder::num_reactors | ( | int | num_reactors | ) |
Set the number of reactors for the RPC messenger.
The reactor threads are used for sending and receiving. If not provided, the underlying messenger is created with the default number of reactor threads.
[in] | num_reactors | Number of reactors to set. |