Bird
0
0

Given this Hadoop MapReduce snippet to merge small files, what will be the output format of the job?

medium📝 Predict Output Q4 of 15
Hadoop - Performance Tuning
Given this Hadoop MapReduce snippet to merge small files, what will be the output format of the job?
job.setInputFormatClass(CombineFileInputFormat.class);
job.setOutputFormatClass(SequenceFileOutputFormat.class);
AMultiple small files as output
BText files with combined content
COne large SequenceFile containing merged data
DCompressed small files
Step-by-Step Solution
Solution:
  1. Step 1: Understand CombineFileInputFormat role

    It combines multiple small input files into fewer splits for efficient processing.
  2. Step 2: Understand SequenceFileOutputFormat role

    It writes output as SequenceFiles, which are binary files storing key-value pairs.
  3. Final Answer:

    One large SequenceFile containing merged data -> Option C
  4. Quick Check:

    CombineFileInput + SequenceFileOutput = large merged SequenceFile [OK]
Quick Trick: CombineFileInput + SequenceFileOutput = merged large file [OK]
Common Mistakes:
  • Assuming output remains multiple small files
  • Thinking output is plain text
  • Confusing compression with file merging

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Hadoop Quizzes