nerdexam
Cloudera

CCD-410 · Question #22

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

The correct answer is D. The default partitioner computers the hash of the key and divides that valule modulo the number. The default partitioner computes a hash value for the key and assigns the partition based on this 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…

Developing with Apache Spark Core

Question

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

Options

  • AThe default partitioner assigns key-values pairs to reduces based on an internal random number
  • BThe default partitioner implements a round-robin strategy, shuffling the key-value pairs to each
  • CThe default partitioner computers the hash of the key. Hash values between specific ranges are
  • DThe default partitioner computers the hash of the key and divides that valule modulo the number
  • EThe default partitioner computers the hash of the value and takes the mod of that value with the

How the community answered

(42 responses)
  • A
    12% (5)
  • B
    2% (1)
  • C
    5% (2)
  • D
    79% (33)
  • E
    2% (1)

Explanation

The default partitioner computes a hash value for the key and assigns the partition based on this 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.

Topics

#partitioner#hash partitioning#modulo#key distribution

Community Discussion

No community discussion yet for this question.

Full CCD-410 Practice