Partitioner 源码学习

Partitions the key space.
Partitioner controls the partitioning of the keys of the intermediate map-outputs. The key (or a subset of the key) is used to derive
the partition, typically by a hash function. The total number of partitions is the same as the number of reduce tasks for the job. Hence this controls
which of the mreduce tasks the intermediate key (and hence the record) is sent for reduction.
Note: If you require your Partitioner class to obtain the Job’s configuration object, implement the {@link Configurable} interface.
@see Reducer

猜你喜欢

转载自blog.csdn.net/qq_18532033/article/details/88796652
今日推荐