nerdexam
Cloudera

CCD-410 · Question #26

Which best describes what the map method accepts and emits?

The correct answer is D. It accepts a single key-value pairs as input and can emit any number of key-value pair as output, including. public class Mapper<KEYIN,VALUEIN,KEYOUT,VALUEOUT> Maps input key/value pairs to a set of intermediate key/value pairs. Maps are the individual tasks which transform input records into a intermediate records. The transformed intermediate records need not be of the same type as…

Developing with Apache Spark Core

Question

Which best describes what the map method accepts and emits?

Options

  • AIt accepts a single key-value pair as input and emits a single key and list of corresponding values as output.
  • BIt accepts a single key-value pairs as input and can emit only one key-value pair as output.
  • CIt accepts a list key-value pairs as input and can emit only one key-value pair as output.
  • DIt accepts a single key-value pairs as input and can emit any number of key-value pair as output, including

How the community answered

(51 responses)
  • A
    6% (3)
  • B
    16% (8)
  • C
    4% (2)
  • D
    75% (38)

Explanation

public class Mapper<KEYIN,VALUEIN,KEYOUT,VALUEOUT> Maps input key/value pairs to a set of intermediate key/value pairs. Maps are the individual tasks which transform input records into a intermediate records. The transformed intermediate records need not be of the same type as the input records. A given input pair may map to zero or many

Topics

#map function#key-value pairs#input/output contract#MapReduce

Community Discussion

No community discussion yet for this question.

Full CCD-410 Practice