public abstract class Partitioner
extends java.lang.Object
Constructor and Description |
---|
Partitioner() |
Modifier and Type | Method and Description |
---|---|
abstract void |
createFromPoints(Rectangle mbr,
Point[] points,
int numPartitions)
Populate this partitioner for a set of points and number of partitions
|
abstract CellInfo |
getPartition(int partitionID)
Returns the details of a specific partition given its ID.
|
abstract CellInfo |
getPartitionAt(int index)
Returns the detail of a partition given its position starting from zero
and ending at partitionCount() - 1
|
abstract int |
getPartitionCount()
Returns total number of partitions
|
static Partitioner |
getPartitioner(Configuration conf)
Retrieves the value of a partitioner for a given job.
|
abstract int |
overlapPartition(Shape shape)
Returns only one overlapping partition.
|
abstract void |
overlapPartitions(Shape shape,
ResultCollector<java.lang.Integer> matcher)
Overlap a shape with partitions and calls a matcher for each overlapping
partition.
|
static void |
setPartitioner(Configuration conf,
Partitioner partitioner)
Sets the class and value of a partitioner in the given job
|
public abstract void createFromPoints(Rectangle mbr, Point[] points, int numPartitions)
mbr
- points
- numPartitions
- public abstract void overlapPartitions(Shape shape, ResultCollector<java.lang.Integer> matcher)
shape
- matcher
- public abstract int overlapPartition(Shape shape)
shape
- public abstract CellInfo getPartition(int partitionID)
partitionID
- public abstract CellInfo getPartitionAt(int index)
partitionID
- public abstract int getPartitionCount()
public static void setPartitioner(Configuration conf, Partitioner partitioner) throws java.io.IOException
conf
- partitioner
- java.io.IOException
public static Partitioner getPartitioner(Configuration conf)
conf
-