public class RangePartitioner<K,V> extends Partitioner
Partitioner
that partitions sortable records by range into roughly
equal ranges. The ranges are determined by sampling the content of the RDD passed in.Constructor and Description |
---|
RangePartitioner(int partitions,
RDD<? extends scala.Product2<K,V>> rdd,
boolean ascending,
scala.math.Ordering<K> evidence$1,
scala.reflect.ClassTag<K> evidence$2) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
int |
getPartition(Object key) |
int |
numPartitions() |
defaultPartitioner
public int numPartitions()
numPartitions
in class Partitioner
public int getPartition(Object key)
getPartition
in class Partitioner
public boolean equals(Object other)
equals
in class Object