Bird
0
0

Which of the following is a correct Hadoop command to merge small files into one large file?

easy📝 Syntax Q12 of 15
Hadoop - Performance Tuning
Which of the following is a correct Hadoop command to merge small files into one large file?
Ahadoop fs -rm /input/*
Bhadoop fs -copyFromLocal /input /output
Chadoop fs -ls /input
Dhadoop fs -getmerge /input /output/mergedfile
Step-by-Step Solution
Solution:
  1. Step 1: Identify command to merge files

    The -getmerge command merges multiple files from HDFS into one local file.
  2. Step 2: Check other commands

    -copyFromLocal copies files to HDFS, -ls lists files, and -rm deletes files, so they don't merge files.
  3. Final Answer:

    hadoop fs -getmerge /input /output/mergedfile -> Option D
  4. Quick Check:

    Use -getmerge to combine files [OK]
Quick Trick: Use 'hadoop fs -getmerge' to combine small files [OK]
Common Mistakes:
  • Confusing copy commands with merging
  • Using list or remove commands to merge
  • Not specifying output file for merge

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Hadoop Quizzes