PrepAway - Latest Free Exam Questions & Answers

which best describes the behavior of the default partitioner?

Analyze each scenario below and indentify which best describes the behavior of the default
partitioner?

PrepAway - Latest Free Exam Questions & Answers

A.
The default partitioner assigns key-values pairs to reduces based on an internal random
number generator.

B.
The default partitioner implements a round-robin strategy, shuffling the key-value pairs to each
reducer in turn. This ensures an event partition of the key space.

C.
The default partitioner computes the hash of the key. Hash values between specific ranges are
associated with different buckets, and each bucket is assigned to a specific reducer.

D.
The default partitioner computes the hash of the key and divides that valule modulo the number
of reducers. The result determines the reducer assigned to process the key-value pair.

E.
The default partitioner computes the hash of the value and takes the mod of that value with the
number of reducers. The result determines the reducer assigned to process the key-value pair.

Explanation:
The default partitioner computes a hash value for the key and assigns the partition
based on this result.
The default Partitioner implementation is called HashPartitioner. It uses the hashCode() method of
the key objects modulo the number of partitions total to determine which partition to send a given
(key, value) pair to.
In Hadoop, the default partitioner is HashPartitioner, which hashes a record’s key to determine
which partition (and thus which reducer) the record belongs in.The number of partition is then
equal to the number of reduce tasks for the job.
Reference: Getting Started With (Customized) Partitioning

2 Comments on “which best describes the behavior of the default partitioner?


Leave a Reply

Your email address will not be published. Required fields are marked *