New Year Sale ! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Hortonworks Exam HDPCD Topic 2 Question 52 Discussion

Actual exam question for Hortonworks's HDPCD exam
Question #: 52
Topic #: 2
[All HDPCD Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: D

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.


Contribute your Thoughts:

Leatha
6 months ago
That's an interesting perspective, but I still lean towards option C.
upvoted 0 times
...
Antonio
6 months ago
I think B is the correct answer.
upvoted 0 times
...
Leatha
6 months ago
Hmm, that makes sense too. But I think C still fits the behavior better.
upvoted 0 times
...
Caprice
6 months ago
I disagree, I believe the answer is D.
upvoted 0 times
...
Leatha
6 months ago
I think the answer is C.
upvoted 0 times
...
Margarita
7 months ago
Actually, I think the default partitioner computes the hash of the key. Hash values between specific ranges are associated with different buckets.
upvoted 0 times
...
Tatum
7 months ago
Hmm, interesting. So it sounds like the default partitioner uses a random number generator for assignment?
upvoted 0 times
...
Huey
8 months ago
I believe the default partitioner computes the hash of the key and divides that value modulo the number of reducers.
upvoted 0 times
...
Tatum
8 months ago
I think the default partitioner assigns key-values pairs to reducers based on an internal random number generator.
upvoted 0 times
...

Save Cancel