Kudu C++ client API
|
Alters an existing table based on the provided steps. More...
#include <client.h>
Public Member Functions | |
KuduTableAlterer * | RenameTo (const std::string &new_name) |
KuduColumnSpec * | AddColumn (const std::string &name) |
KuduColumnSpec * | AlterColumn (const std::string &name) |
KuduTableAlterer * | DropColumn (const std::string &name) |
KuduTableAlterer * | AddRangePartition (KuduPartialRow *lower_bound, KuduPartialRow *upper_bound, KuduTableCreator::RangePartitionBound lower_bound_type=KuduTableCreator::INCLUSIVE_BOUND, KuduTableCreator::RangePartitionBound upper_bound_type=KuduTableCreator::EXCLUSIVE_BOUND) |
KuduTableAlterer * | DropRangePartition (KuduPartialRow *lower_bound, KuduPartialRow *upper_bound, KuduTableCreator::RangePartitionBound lower_bound_type=KuduTableCreator::INCLUSIVE_BOUND, KuduTableCreator::RangePartitionBound upper_bound_type=KuduTableCreator::EXCLUSIVE_BOUND) |
KuduTableAlterer * | timeout (const MonoDelta &timeout) |
KuduTableAlterer * | wait (bool wait) |
Status | Alter () |
Friends | |
class | KuduClient |
Alters an existing table based on the provided steps.
Create a new instance of a table alterer using KuduClient::NewTableAlterer(). An example of usage:
KuduColumnSpec* kudu::client::KuduTableAlterer::AddColumn | ( | const std::string & | name | ) |
Add a new column to the table.
When adding a column, you must specify the default value of the new column using KuduColumnSpec::DefaultValue(...).
name | Name of the column do add. |
KuduTableAlterer* kudu::client::KuduTableAlterer::AddRangePartition | ( | KuduPartialRow * | lower_bound, |
KuduPartialRow * | upper_bound, | ||
KuduTableCreator::RangePartitionBound | lower_bound_type = KuduTableCreator::INCLUSIVE_BOUND , |
||
KuduTableCreator::RangePartitionBound | upper_bound_type = KuduTableCreator::EXCLUSIVE_BOUND |
||
) |
Add a range partition to the table with the specified lower bound and upper bound.
[in] | lower_bound | The lower bound of the range partition to add. If the row is empty, then the lower bound is unbounded. If any of the columns are unset, the logical minimum value for the column's type will be used by default. |
[in] | upper_bound | The upper bound of the range partition to add. If the row is empty, then the upper bound is unbounded. If any of the individual columns are unset, the logical minimum value for the column' type will be used by default. |
[in] | lower_bound_type | The type of the lower bound, either inclusive or exclusive. Defaults to inclusive. |
[in] | upper_bound_type | The type of the lower bound, either inclusive or exclusive. Defaults to exclusive. |
Status kudu::client::KuduTableAlterer::Alter | ( | ) |
KuduColumnSpec* kudu::client::KuduTableAlterer::AlterColumn | ( | const std::string & | name | ) |
Alter an existing column.
[in] | name | Name of the column to alter. |
KuduTableAlterer* kudu::client::KuduTableAlterer::DropColumn | ( | const std::string & | name | ) |
Drops an existing column from the table.
[in] | name | Name of the column to alter. |
KuduTableAlterer* kudu::client::KuduTableAlterer::DropRangePartition | ( | KuduPartialRow * | lower_bound, |
KuduPartialRow * | upper_bound, | ||
KuduTableCreator::RangePartitionBound | lower_bound_type = KuduTableCreator::INCLUSIVE_BOUND , |
||
KuduTableCreator::RangePartitionBound | upper_bound_type = KuduTableCreator::EXCLUSIVE_BOUND |
||
) |
Drop the range partition from the table with the specified lower bound and upper bound. The bounds must match an existing range partition exactly, and may not span multiple range partitions.
[in] | lower_bound | The inclusive lower bound of the range partition to drop. If the row is empty, then the lower bound is unbounded. If any of the columns are unset, the logical minimum value for the column's type will be used by default. |
[in] | upper_bound | The exclusive upper bound of the range partition to add. If the row is empty, then the upper bound is unbounded. If any of the individual columns are unset, the logical minimum value for the column' type will be used by default. |
[in] | lower_bound_type | The type of the lower bound, either inclusive or exclusive. Defaults to inclusive. |
[in] | upper_bound_type | The type of the lower bound, either inclusive or exclusive. Defaults to exclusive. |
KuduTableAlterer* kudu::client::KuduTableAlterer::RenameTo | ( | const std::string & | new_name | ) |
Rename the table.
[in] | new_name | The new name for the table. |
KuduTableAlterer* kudu::client::KuduTableAlterer::timeout | ( | const MonoDelta & | timeout | ) |
Set a timeout for the alteration operation.
This includes any waiting after the alter has been submitted (i.e. if the alter is slow to be performed on a large table, it may time out and then later be successful).
[in] | timeout | Timeout to set. |
KuduTableAlterer* kudu::client::KuduTableAlterer::wait | ( | bool | wait | ) |
Whether to wait for completion of alteration operations.
If set to true
, an alteration operation returns control only after the operation is complete. Otherwise, every operation returns immediately. By default (i.e. when an alteration object is created) it is set to true
.
[in] | wait | Whether to wait for alteration operation to complete before returning control. |