Bird
0
0

You wrote a script to merge small files using hadoop fs -getmerge, but it fails with an error: "Destination is a directory". What is the likely cause?

medium📝 Debug Q14 of 15
Hadoop - Performance Tuning
You wrote a script to merge small files using hadoop fs -getmerge, but it fails with an error: "Destination is a directory". What is the likely cause?
AYou specified a directory as the output file instead of a file name
BYou used the wrong input directory path
CYou forgot to set Hadoop environment variables
DYou tried to merge files that are too large
Step-by-Step Solution
Solution:
  1. Step 1: Understand getmerge output

    The -getmerge command requires the output to be a single file, not a directory.
  2. Step 2: Identify error cause

    The error "Destination is a directory" means the output path given is a folder, not a file name.
  3. Final Answer:

    You specified a directory as the output file instead of a file name -> Option A
  4. Quick Check:

    Output must be a file, not a directory [OK]
Quick Trick: Output path for getmerge must be a file, not folder [OK]
Common Mistakes:
  • Using directory path as output
  • Ignoring error message details
  • Assuming input path causes this error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Hadoop Quizzes