0
0
Hadoopdata~10 mins

MapReduce job execution flow in Hadoop - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the input format class in a MapReduce job configuration.

Hadoop
job.setInputFormatClass([1]);
Drag options to blanks, or click blank then click option'
ATextInputFormat.class
BFileOutputFormat.class
CMapper.class
DReducer.class
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing input format with output format.
Using Mapper or Reducer classes instead of input format.
2fill in blank
medium

Complete the code to set the number of reduce tasks in a MapReduce job.

Hadoop
job.setNumReduceTasks([1]);
Drag options to blanks, or click blank then click option'
A0
B-1
C10
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Setting reduce tasks to zero when reduce phase is needed.
Using negative numbers which are invalid.
3fill in blank
hard

Fix the error in the code to correctly set the output key class for a MapReduce job.

Hadoop
job.setOutputKeyClass([1]);
Drag options to blanks, or click blank then click option'
AText.class
BIntWritable.class
CTextInputFormat.class
DMapper.class
Attempts:
3 left
💡 Hint
Common Mistakes
Using input format or Mapper classes instead of data types.
Choosing a value class instead of key class.
4fill in blank
hard

Fill both blanks to set the output key class and output value class in a MapReduce job.

Hadoop
job.setOutputKeyClass([1]); job.setOutputValueClass([2]);
Drag options to blanks, or click blank then click option'
AText.class
BIntWritable.class
CTextInputFormat.class
DMapper.class
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting mapper or format classes.
Wrong type for key/value (e.g., IntWritable for key).
5fill in blank
hard

Fill all three blanks to configure map output key class, value class, and combiner class in a MapReduce job.

Hadoop
job.setMapOutputKeyClass([1]); job.setMapOutputValueClass([2]); job.setCombinerClass([3]);
Drag options to blanks, or click blank then click option'
AText.class
BIntWritable.class
CReducer.class
DMapper.class
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing map output with final output classes.
Using Mapper.class for combiner.