Trait hbase_thrift::hbase::HbaseSyncHandler[][src]

pub trait HbaseSyncHandler {
Show 49 methods fn handle_enable_table(&self, table_name: Bytes) -> Result<()>;
fn handle_disable_table(&self, table_name: Bytes) -> Result<()>;
fn handle_is_table_enabled(&self, table_name: Bytes) -> Result<bool>;
fn handle_compact(&self, table_name_or_region_name: Bytes) -> Result<()>;
fn handle_major_compact(
        &self,
        table_name_or_region_name: Bytes
    ) -> Result<()>;
fn handle_get_table_names(&self) -> Result<Vec<Text>>;
fn handle_get_table_names_with_is_table_enabled(
        &self
    ) -> Result<BTreeMap<Text, bool>>;
fn handle_get_column_descriptors(
        &self,
        table_name: Text
    ) -> Result<BTreeMap<Text, ColumnDescriptor>>;
fn handle_get_table_regions(
        &self,
        table_name: Text
    ) -> Result<Vec<TRegionInfo>>;
fn handle_create_table(
        &self,
        table_name: Text,
        column_families: Vec<ColumnDescriptor>
    ) -> Result<()>;
fn handle_delete_table(&self, table_name: Text) -> Result<()>;
fn handle_get(
        &self,
        table_name: Text,
        row: Text,
        column: Text,
        attributes: BTreeMap<Text, Text>
    ) -> Result<Vec<TCell>>;
fn handle_get_ver(
        &self,
        table_name: Text,
        row: Text,
        column: Text,
        num_versions: i32,
        attributes: BTreeMap<Text, Text>
    ) -> Result<Vec<TCell>>;
fn handle_get_ver_ts(
        &self,
        table_name: Text,
        row: Text,
        column: Text,
        timestamp: i64,
        num_versions: i32,
        attributes: BTreeMap<Text, Text>
    ) -> Result<Vec<TCell>>;
fn handle_get_row(
        &self,
        table_name: Text,
        row: Text,
        attributes: BTreeMap<Text, Text>
    ) -> Result<Vec<TRowResult>>;
fn handle_get_row_with_columns(
        &self,
        table_name: Text,
        row: Text,
        columns: Vec<Text>,
        attributes: BTreeMap<Text, Text>
    ) -> Result<Vec<TRowResult>>;
fn handle_get_row_ts(
        &self,
        table_name: Text,
        row: Text,
        timestamp: i64,
        attributes: BTreeMap<Text, Text>
    ) -> Result<Vec<TRowResult>>;
fn handle_get_row_with_columns_ts(
        &self,
        table_name: Text,
        row: Text,
        columns: Vec<Text>,
        timestamp: i64,
        attributes: BTreeMap<Text, Text>
    ) -> Result<Vec<TRowResult>>;
fn handle_get_rows(
        &self,
        table_name: Text,
        rows: Vec<Text>,
        attributes: BTreeMap<Text, Text>
    ) -> Result<Vec<TRowResult>>;
fn handle_get_rows_with_columns(
        &self,
        table_name: Text,
        rows: Vec<Text>,
        columns: Vec<Text>,
        attributes: BTreeMap<Text, Text>
    ) -> Result<Vec<TRowResult>>;
fn handle_get_rows_ts(
        &self,
        table_name: Text,
        rows: Vec<Text>,
        timestamp: i64,
        attributes: BTreeMap<Text, Text>
    ) -> Result<Vec<TRowResult>>;
fn handle_get_rows_with_columns_ts(
        &self,
        table_name: Text,
        rows: Vec<Text>,
        columns: Vec<Text>,
        timestamp: i64,
        attributes: BTreeMap<Text, Text>
    ) -> Result<Vec<TRowResult>>;
fn handle_mutate_row(
        &self,
        table_name: Text,
        row: Text,
        mutations: Vec<Mutation>,
        attributes: BTreeMap<Text, Text>
    ) -> Result<()>;
fn handle_mutate_row_ts(
        &self,
        table_name: Text,
        row: Text,
        mutations: Vec<Mutation>,
        timestamp: i64,
        attributes: BTreeMap<Text, Text>
    ) -> Result<()>;
fn handle_mutate_rows(
        &self,
        table_name: Text,
        row_batches: Vec<BatchMutation>,
        attributes: BTreeMap<Text, Text>
    ) -> Result<()>;
fn handle_mutate_rows_ts(
        &self,
        table_name: Text,
        row_batches: Vec<BatchMutation>,
        timestamp: i64,
        attributes: BTreeMap<Text, Text>
    ) -> Result<()>;
fn handle_atomic_increment(
        &self,
        table_name: Text,
        row: Text,
        column: Text,
        value: i64
    ) -> Result<i64>;
fn handle_delete_all(
        &self,
        table_name: Text,
        row: Text,
        column: Text,
        attributes: BTreeMap<Text, Text>
    ) -> Result<()>;
fn handle_delete_all_ts(
        &self,
        table_name: Text,
        row: Text,
        column: Text,
        timestamp: i64,
        attributes: BTreeMap<Text, Text>
    ) -> Result<()>;
fn handle_delete_all_row(
        &self,
        table_name: Text,
        row: Text,
        attributes: BTreeMap<Text, Text>
    ) -> Result<()>;
fn handle_increment(&self, increment: TIncrement) -> Result<()>;
fn handle_increment_rows(&self, increments: Vec<TIncrement>) -> Result<()>;
fn handle_delete_all_row_ts(
        &self,
        table_name: Text,
        row: Text,
        timestamp: i64,
        attributes: BTreeMap<Text, Text>
    ) -> Result<()>;
fn handle_scanner_open_with_scan(
        &self,
        table_name: Text,
        scan: TScan,
        attributes: BTreeMap<Text, Text>
    ) -> Result<ScannerID>;
fn handle_scanner_open(
        &self,
        table_name: Text,
        start_row: Text,
        columns: Vec<Text>,
        attributes: BTreeMap<Text, Text>
    ) -> Result<ScannerID>;
fn handle_scanner_open_with_stop(
        &self,
        table_name: Text,
        start_row: Text,
        stop_row: Text,
        columns: Vec<Text>,
        attributes: BTreeMap<Text, Text>
    ) -> Result<ScannerID>;
fn handle_scanner_open_with_prefix(
        &self,
        table_name: Text,
        start_and_prefix: Text,
        columns: Vec<Text>,
        attributes: BTreeMap<Text, Text>
    ) -> Result<ScannerID>;
fn handle_scanner_open_ts(
        &self,
        table_name: Text,
        start_row: Text,
        columns: Vec<Text>,
        timestamp: i64,
        attributes: BTreeMap<Text, Text>
    ) -> Result<ScannerID>;
fn handle_scanner_open_with_stop_ts(
        &self,
        table_name: Text,
        start_row: Text,
        stop_row: Text,
        columns: Vec<Text>,
        timestamp: i64,
        attributes: BTreeMap<Text, Text>
    ) -> Result<ScannerID>;
fn handle_scanner_get(&self, id: ScannerID) -> Result<Vec<TRowResult>>;
fn handle_scanner_get_list(
        &self,
        id: ScannerID,
        nb_rows: i32
    ) -> Result<Vec<TRowResult>>;
fn handle_scanner_close(&self, id: ScannerID) -> Result<()>;
fn handle_get_region_info(&self, row: Text) -> Result<TRegionInfo>;
fn handle_append(&self, append: TAppend) -> Result<Vec<TCell>>;
fn handle_check_and_put(
        &self,
        table_name: Text,
        row: Text,
        column: Text,
        value: Text,
        mput: Mutation,
        attributes: BTreeMap<Text, Text>
    ) -> Result<bool>;
fn handle_get_thrift_server_type(&self) -> Result<TThriftServerType>;
fn handle_get_cluster_id(&self) -> Result<String>;
fn handle_grant(&self, info: TAccessControlEntity) -> Result<bool>;
fn handle_revoke(&self, info: TAccessControlEntity) -> Result<bool>;
}

Required methods

Brings a table on-line (enables it)

Disables a table (takes it off-line) If it is being served, the master will tell the servers to stop serving it.

@return true if table is on-line

List all the userspace tables.

@return returns a list of names

List all the userspace tables and their enabled or disabled flags.

@return list of tables with is enabled flags

List all the column families assoicated with a table.

@return list of column family descriptors

List the regions associated with a table.

@return list of region descriptors

Create a table with the specified column families. The name field for each ColumnDescriptor must be set and must end in a colon (:). All other fields are optional and will get default values if not explicitly specified.

@throws IllegalArgument if an input parameter is invalid

@throws AlreadyExists if the table name already exists

Deletes a table

@throws IOError if table doesn’t exist on server or there was some other problem

Get a single TCell for the specified table, row, and column at the latest timestamp. Returns an empty list if no such value exists.

@return value for specified row/column

Get the specified number of versions for the specified table, row, and column.

@return list of cells for specified row/column

Get the specified number of versions for the specified table, row, and column. Only versions less than or equal to the specified timestamp will be returned.

@return list of cells for specified row/column

Get all the data for the specified table and row at the latest timestamp. Returns an empty list if the row does not exist.

@return TRowResult containing the row and map of columns to TCells

Get the specified columns for the specified table and row at the latest timestamp. Returns an empty list if the row does not exist.

@return TRowResult containing the row and map of columns to TCells

Get all the data for the specified table and row at the specified timestamp. Returns an empty list if the row does not exist.

@return TRowResult containing the row and map of columns to TCells

Get the specified columns for the specified table and row at the specified timestamp. Returns an empty list if the row does not exist.

@return TRowResult containing the row and map of columns to TCells

Get all the data for the specified table and rows at the latest timestamp. Returns an empty list if no rows exist.

@return TRowResult containing the rows and map of columns to TCells

Get the specified columns for the specified table and rows at the latest timestamp. Returns an empty list if no rows exist.

@return TRowResult containing the rows and map of columns to TCells

Get all the data for the specified table and rows at the specified timestamp. Returns an empty list if no rows exist.

@return TRowResult containing the rows and map of columns to TCells

Get the specified columns for the specified table and rows at the specified timestamp. Returns an empty list if no rows exist.

@return TRowResult containing the rows and map of columns to TCells

Apply a series of mutations (updates/deletes) to a row in a single transaction. If an exception is thrown, then the transaction is aborted. Default current timestamp is used, and all entries will have an identical timestamp.

Apply a series of mutations (updates/deletes) to a row in a single transaction. If an exception is thrown, then the transaction is aborted. The specified timestamp is used, and all entries will have an identical timestamp.

Apply a series of batches (each a series of mutations on a single row) in a single transaction. If an exception is thrown, then the transaction is aborted. Default current timestamp is used, and all entries will have an identical timestamp.

Apply a series of batches (each a series of mutations on a single row) in a single transaction. If an exception is thrown, then the transaction is aborted. The specified timestamp is used, and all entries will have an identical timestamp.

Atomically increment the column value specified. Returns the next value post increment.

Delete all cells that match the passed row and column.

Delete all cells that match the passed row and column and whose timestamp is equal-to or older than the passed timestamp.

Completely delete the row’s cells.

Increment a cell by the ammount. Increments can be applied async if hbase.regionserver.thrift.coalesceIncrement is set to true. False is the default. Turn to true if you need the extra performance and can accept some data loss if a thrift server dies with increments still in the queue.

Completely delete the row’s cells marked with a timestamp equal-to or older than the passed timestamp.

Get a scanner on the current table, using the Scan instance for the scan parameters.

Get a scanner on the current table starting at the specified row and ending at the last row in the table. Return the specified columns.

@return scanner id to be used with other scanner procedures

Get a scanner on the current table starting and stopping at the specified rows. ending at the last row in the table. Return the specified columns.

@return scanner id to be used with other scanner procedures

Open a scanner for a given prefix. That is all rows will have the specified prefix. No other rows will be returned.

@return scanner id to use with other scanner calls

Get a scanner on the current table starting at the specified row and ending at the last row in the table. Return the specified columns. Only values with the specified timestamp are returned.

@return scanner id to be used with other scanner procedures

Get a scanner on the current table starting and stopping at the specified rows. ending at the last row in the table. Return the specified columns. Only values with the specified timestamp are returned.

@return scanner id to be used with other scanner procedures

Returns the scanner’s current row value and advances to the next row in the table. When there are no more rows in the table, or a key greater-than-or-equal-to the scanner’s specified stopRow is reached, an empty list is returned.

@return a TRowResult containing the current row and a map of the columns to TCells.

@throws IllegalArgument if ScannerID is invalid

@throws NotFound when the scanner reaches the end

Returns, starting at the scanner’s current row value nbRows worth of rows and advances to the next row in the table. When there are no more rows in the table, or a key greater-than-or-equal-to the scanner’s specified stopRow is reached, an empty list is returned.

@return a TRowResult containing the current row and a map of the columns to TCells.

@throws IllegalArgument if ScannerID is invalid

@throws NotFound when the scanner reaches the end

Closes the server-state associated with an open scanner.

@throws IllegalArgument if ScannerID is invalid

Get the regininfo for the specified row. It scans the metatable to find region’s start and end keys.

@return value for specified row/column

Appends values to one or more columns within a single row.

@return values of columns after the append operation.

Atomically checks if a row/family/qualifier value matches the expected value. If it does, it adds the corresponding mutation operation for put.

@return true if the new put was executed, false otherwise

Get the type of this thrift server.

@return the type of this thrift server

Returns the cluster ID for this cluster.

Grant permissions in namespace or table level.

Revoke permissions in namespace or table level.

Implementors