CCD-410 · Question #3
You are developing a MapReduce job for sales reporting. The mapper will process input keys representing the year (IntWritable) and input values representing product indentifies (Text). Indentify…
The correct answer is D. The InputFormat used by the job determines the mapper's input key and value types. The input types fed to the mapper are controlled by the InputFormat used. The default input format, "TextInputFormat," will load data in as (LongWritable, Text) pairs. The long value is the byte offset of the line in the file. The Text object holds the string contents of the…
Question
You are developing a MapReduce job for sales reporting. The mapper will process input keys representing the year (IntWritable) and input values representing product indentifies (Text). Indentify what determines the data types used by the Mapper for a given job.
Options
- AThe key and value types specified in the JobConf.setMapInputKeyClass and
- BThe data types specified in HADOOP_MAP_DATATYPES environment variable
- CThe mapper-specification.xml file submitted with the job determine the mapper's input key and value types.
- DThe InputFormat used by the job determines the mapper's input key and value types.
How the community answered
(33 responses)- A9% (3)
- B15% (5)
- C6% (2)
- D70% (23)
Explanation
The input types fed to the mapper are controlled by the InputFormat used. The default input format, "TextInputFormat," will load data in as (LongWritable, Text) pairs. The long value is the byte offset of the line in the file. The Text object holds the string contents of the line of the file. Note: The data types emitted by the reducer are identified by setOutputKeyClass() andsetOutputValueClass(). The data types emitted by the reducer are identified by setOutputKeyClass() and setOutputValueClass(). By default, it is assumed that these are the output types of the mapper as well. If this is not the case, the methods setMapOutputKeyClass() and setMapOutputValueClass() methods of the JobConf class will override these.
Topics
Community Discussion
No community discussion yet for this question.