T - Type of object in the partitionpublic class FixedSizeChunkPartitioner<T> extends Object implements Partitioner<T>
FixedSizeChunkPartitioner dynamically partitions data into chunks
of a fixed length. The partitioner does not need to know
about the length of the data apriori.| Constructor and Description |
|---|
FixedSizeChunkPartitioner(Iterable<T> objects)
Construct with data in the form of an
Iterable. |
FixedSizeChunkPartitioner(Iterable<T> objects,
int chunkSize)
Construct with data in the form of an
Iterable and the given
number of items per chunk. |
public FixedSizeChunkPartitioner(Iterable<T> objects)
Iterable. The number of
items per chunk is set at the default value (20).objects - the Iterable representing the data.public FixedSizeChunkPartitioner(Iterable<T> objects, int chunkSize)
Iterable and the given
number of items per chunk.objects - the Iterable representing the data.chunkSize - number of items in each chunk.public Iterator<Iterator<T>> getPartitions()
getPartitions in interface Partitioner<T>