|
Kudu C++ client API
|
#include <client.h>
Public Member Functions | |
| int | NumPartitions () const |
| Status | PartitionRow (const KuduPartialRow &row, int *partition) |
Friends | |
| class | KuduPartitionerBuilder |
A KuduPartitioner allows clients to determine the target partition of a row without actually performing a write. The set of partitions is eagerly fetched when the KuduPartitioner is constructed so that the actual partitioning step can be performed synchronously without any network trips.
| int kudu::client::KuduPartitioner::NumPartitions | ( | ) | const |
Return the number of partitions known by this partitioner. The partition indices returned by PartitionRow are guaranteed to be less than this value.
| Status kudu::client::KuduPartitioner::PartitionRow | ( | const KuduPartialRow & | row, |
| int * | partition | ||
| ) |
Determine the partition index that the given row falls into.
| [in] | row | The row to be partitioned. |
| [out] | partition | The resulting partition index, or -1 if the row falls into a non-covered range. The result will be less than NumPartitioons(). |