Struct kudu::Client
[−]
[src]
pub struct Client { /* fields omitted */ }
A Kudu database client.
Encapsulates the connection to a Kudu cluster. Only a single Client
instance should be used
per application.
Methods
impl Client
[src]
fn new(config: ClientConfig) -> Client
Creates a new client with the provided configuration.
fn create_table(&self,
builder: TableBuilder,
deadline: Instant)
-> Result<TableId>
builder: TableBuilder,
deadline: Instant)
-> Result<TableId>
Creates a new Kudu table with the schema and options specified by builder
. Returns the
new table's ID, or an error on failure.
fn is_create_table_done<S>(&self, table: S, deadline: Instant) -> Result<bool> where S: Into<String>
Returns true
if the table is fully created.
fn is_create_table_done_by_id(&self,
id: &TableId,
deadline: Instant)
-> Result<bool>
id: &TableId,
deadline: Instant)
-> Result<bool>
Returns true
if the table is fully created.
fn wait_for_table_creation<S>(&self, table: S, deadline: Instant) -> Result<()> where S: Into<String>
Synchronously waits until the table is created. If an error is returned, the table may not be created yet.
fn wait_for_table_creation_by_id(&self,
id: &TableId,
deadline: Instant)
-> Result<()>
id: &TableId,
deadline: Instant)
-> Result<()>
Synchronously waits until the table is created. If an error is returned, the table may not be created yet.
fn delete_table<S>(&self, table: S, deadline: Instant) -> Result<()> where S: Into<String>
Deletes the table.
fn delete_table_by_id(&self, id: &TableId, deadline: Instant) -> Result<()>
Deletes the table.
fn alter_table<S>(&self,
table: S,
alter: AlterTableBuilder,
deadline: Instant)
-> Result<TableId> where S: Into<String>
table: S,
alter: AlterTableBuilder,
deadline: Instant)
-> Result<TableId> where S: Into<String>
fn alter_table_by_id(&self,
id: &TableId,
alter: AlterTableBuilder,
deadline: Instant)
-> Result<()>
id: &TableId,
alter: AlterTableBuilder,
deadline: Instant)
-> Result<()>
fn is_alter_table_done<S>(&self, table: S, deadline: Instant) -> Result<bool> where S: Into<String>
Returns true
if the table is fully altered.
fn is_alter_table_done_by_id(&self,
id: &TableId,
deadline: Instant)
-> Result<bool>
id: &TableId,
deadline: Instant)
-> Result<bool>
Returns true
if the table is fully altered.
fn wait_for_table_alteration<S>(&self,
table: S,
deadline: Instant)
-> Result<()> where S: Into<String>
table: S,
deadline: Instant)
-> Result<()> where S: Into<String>
Synchronously waits until the table is altered. If an error is returned, the table may not be altered yet.
fn wait_for_table_alteration_by_id(&self,
id: &TableId,
deadline: Instant)
-> Result<()>
id: &TableId,
deadline: Instant)
-> Result<()>
Synchronously waits until the table is altered. If an error is returned, the table may not be altered yet.
fn list_tables(&self, deadline: Instant) -> Result<Vec<(String, TableId)>>
Lists all tables and their associated table ID.
fn list_tables_with_prefix<S>(&self,
name_prefix: S,
deadline: Instant)
-> Result<Vec<(String, TableId)>> where S: Into<String>
name_prefix: S,
deadline: Instant)
-> Result<Vec<(String, TableId)>> where S: Into<String>
Lists all tables with the a name matching the provided prefix, and their associated table ID.
fn list_masters(&self, deadline: Instant) -> Result<Vec<Master>>
fn list_tablet_servers(&self, deadline: Instant) -> Result<Vec<TabletServer>>
fn open_table<S>(&self, table: S, deadline: Instant) -> Result<Table> where S: Into<String>
Returns an open table.
fn open_table_by_id(&self, id: &TableId, deadline: Instant) -> Result<Table>
Returns an open table.
fn latest_observed_timestamp(&self) -> u64
fn timestamp_observed(&self, timestamp: u64)
Trait Implementations
impl Clone for Client
[src]
fn clone(&self) -> Client
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more