public final class HashPartitioner extends Object implements Partitioner<Integer>
Partitionerwhich hashes output data from a source task according to the key of elements. The data will be hashed by their key, and applied "modulo" operation by the number of destination tasks.
|Constructor and Description|
|Modifier and Type||Method and Description|
Divides the output data from a task into multiple blocks.
public HashPartitioner(int dstParallelism, KeyExtractor keyExtractor)
dstParallelism- the number of destination tasks.
keyExtractor- the key extractor that extracts keys from elements.
Copyright © 2019 The Apache Software Foundation. All rights reserved.