Kudu C++ client API
Public Member Functions | List of all members
kudu::client::KuduRangePartition Class Reference

#include <client.h>

Public Member Functions

 KuduRangePartition (KuduPartialRow *lower_bound, KuduPartialRow *upper_bound, KuduTableCreator::RangePartitionBound lower_bound_type=KuduTableCreator::INCLUSIVE_BOUND, KuduTableCreator::RangePartitionBound upper_bound_type=KuduTableCreator::EXCLUSIVE_BOUND)
 
Status add_hash_partitions (const std::vector< std::string > &columns, int32_t num_buckets, int32_t seed=0)
 

Detailed Description

A helper class to represent a Kudu range partition with a custom hash bucket schema. The hash sub-partitioning for a range partition might be different from the default table-wide hash bucket schema specified during the creation of a table (see KuduTableCreator::add_hash_partitions()). Correspondingly, this class provides a means to specify a custom hash bucket structure for the data in a range partition.

Constructor & Destructor Documentation

◆ KuduRangePartition()

kudu::client::KuduRangePartition::KuduRangePartition ( KuduPartialRow lower_bound,
KuduPartialRow upper_bound,
KuduTableCreator::RangePartitionBound  lower_bound_type = KuduTableCreator::INCLUSIVE_BOUND,
KuduTableCreator::RangePartitionBound  upper_bound_type = KuduTableCreator::EXCLUSIVE_BOUND 
)

Create an object representing the range defined by the given parameters.

Parameters
[in]lower_boundThe lower bound for the range. The KuduRangePartition object takes ownership of the parameter.
[in]upper_boundThe upper bound for the range. The KuduRangePartition object takes ownership of the parameter.
[in]lower_bound_typeThe type of the lower_bound: inclusive or exclusive; inclusive if the parameter is omitted.
[in]upper_bound_typeThe type of the upper_bound: inclusive or exclusive; exclusive if the parameter is omitted.

Member Function Documentation

◆ add_hash_partitions()

Status kudu::client::KuduRangePartition::add_hash_partitions ( const std::vector< std::string > &  columns,
int32_t  num_buckets,
int32_t  seed = 0 
)

Add a level of hash sub-partitioning for this range partition.

The hash schema for the range partition is defined by the whole set of its hash sub-partitioning levels. A range partition can have multiple levels of hash sub-partitioning: this method can be called multiple times to define a multi-dimensional hash bucketing structure for the range. Alternatively, a range partition can have zero levels of hash sub-partitioning: simply don't call this method on a newly created KuduRangePartition object to have no hash sub-partitioning for the range represented by the object.

Parameters
[in]columnsNames of columns to use for partitioning.
[in]num_bucketsNumber of buckets for the hashing.
[in]seedHash seed for mapping rows to hash buckets.
Returns
Operation result status.

The documentation for this class was generated from the following file: