@InterfaceAudience.Public @InterfaceStability.Evolving public class KuduPartitioner extends Object
Modifier and Type | Class and Description |
---|---|
static class |
KuduPartitioner.KuduPartitionerBuilder
A Builder class to build
KuduPartitioner . |
Constructor and Description |
---|
KuduPartitioner(org.apache.kudu.client.PartitionSchema partitionSchema,
Map<String,org.apache.kudu.client.Partition> tabletIdToPartition) |
Modifier and Type | Method and Description |
---|---|
boolean |
isCovered(PartialRow row)
Determine if the given row falls into a valid partition.
|
int |
numPartitions() |
int |
partitionRow(PartialRow row)
Determine the partition index that the given row falls into.
|
public int numPartitions()
public boolean isCovered(PartialRow row)
row
- The row to check.public int partitionRow(PartialRow row) throws org.apache.kudu.client.NonCoveredRangeException
row
- The row to be partitioned.org.apache.kudu.client.NonCoveredRangeException
- if the row falls into a non-covered range.