public class SequentialDataMultiPartitioner
extends java.lang.Object
Constructor and Description |
---|
SequentialDataMultiPartitioner() |
Modifier and Type | Method and Description |
---|---|
static <DataType> java.util.ArrayList<java.util.ArrayList<DataType>> |
create(java.util.Collection<? extends DataType> data,
int numPartitions)
Creates a partition of the given data into "numPartition" roughly equal
sets, preserving their pre-existing sequential ordering, with the
nonzero remainder elements going into the final partition.
|
public static <DataType> java.util.ArrayList<java.util.ArrayList<DataType>> create(java.util.Collection<? extends DataType> data, int numPartitions)
DataType
- Type of data to partition.data
- Collection of data to partitionnumPartitions
- Number of partitions to create.