Bird
0
0

What is the expected result of executing this command in Hadoop?

medium📝 Predict Output Q5 of 15
Hadoop - Performance Tuning
What is the expected result of executing this command in Hadoop?
hadoop fs -getmerge /data/smallfiles /user/output/merged.txt
AAll files under /data/smallfiles are merged into a single local file named merged.txt
BFiles are merged into HDFS at /user/output/merged.txt
CCommand fails because /user/output/merged.txt is a directory
DFiles are copied individually to /user/output/merged.txt directory
Step-by-Step Solution
Solution:
  1. Step 1: Understand -getmerge command

    This command merges files from HDFS source into a single local file.
  2. Step 2: Analyze paths

    /data/smallfiles is HDFS input; /user/output/merged.txt is local output file path.
  3. Final Answer:

    All files under /data/smallfiles are merged into a single local file named merged.txt -> Option A
  4. Quick Check:

    -getmerge outputs local merged file [OK]
Quick Trick: -getmerge merges HDFS files into local file [OK]
Common Mistakes:
  • Assuming output is written back to HDFS
  • Confusing file and directory paths
  • Expecting command to merge files inside HDFS

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Hadoop Quizzes