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) |
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::master_server_addrs | ( | const std::vector< std::string > & | addrs | ) |
Add RPC addresses of multiple masters.
[in] | addrs | RPC addresses of masters to add. |