Bird
0
0

What is wrong with the following Hadoop backup command?

medium📝 Debug Q6 of 15
Hadoop - Cluster Administration
What is wrong with the following Hadoop backup command?
hdfs dfs -copyFromLocal /backup/data.txt /data/
AThe command should be 'hdfs dfs -copyToLocal' instead
BThe source and destination paths are reversed for backup
CThe command does not support copying files
DThe destination directory must be local, not HDFS
Step-by-Step Solution
Solution:
  1. Step 1: Understand command syntax

    '-copyFromLocal' copies files from local filesystem to HDFS, not the other way.
  2. Step 2: Identify backup direction

    Backup from HDFS to local requires '-copyToLocal', so source and destination are reversed here.
  3. Final Answer:

    The source and destination paths are reversed for backup -> Option B
  4. Quick Check:

    Check source is local and destination is HDFS for '-copyFromLocal' [OK]
Quick Trick: CopyFromLocal is local to HDFS, not backup direction [OK]
Common Mistakes:
  • Confusing copyFromLocal with copyToLocal
  • Assuming destination must be local for backup
  • Ignoring source and destination order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Hadoop Quizzes