PrepAway - Latest Free Exam Questions & Answers

Which of the following best describes the map method input and output?

Which of the following best describes the map method input and output?

PrepAway - Latest Free Exam Questions & Answers

A.
It accepts a single key-value pair as input and can emit only one key-value pair as output.

B.
It accepts a list of key-value pairs as input hut run emit only one key value pair as output.

C.
It accepts a single key-value pair as input and emits a single key and list of corresponding
values as output

D.
It accepts a single key-value pair as input and can emit any number of key-value pairs as
output, including zero.

Explanation:
public class Mapper<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
extends Object
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 output pairs.
Reference: org.apache.hadoop.mapreduce
Class Mapper<KEYIN,VALUEIN,KEYOUT,VALUEOUT>

2 Comments on “Which of the following best describes the map method input and output?

  1. Ramesh Hiremath says:

    D.
    It accepts a single key-value pair as input and can emit any number of key-value pairs as
    output, including zero.




    0



    0

Leave a Reply

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