nerdexam
Cloudera

CCA-500 · Question #25

Assume you have a file named foo.txt in your local directory. You issue the following three commands: Hadoop fs -mkdir input Hadoop fs -put foo.txt input/foo.txt Hadoop fs -put foo.txt input What…

The correct answer is E. You get a error message telling you that foo.txt already exists. The file is not written to HDFS. See the full explanation below for the reasoning.

Question

Assume you have a file named foo.txt in your local directory. You issue the following three commands:

Hadoop fs -mkdir input Hadoop fs -put foo.txt input/foo.txt Hadoop fs -put foo.txt input What happens when you issue the third command?

Options

  • AThe write succeeds, overwriting foo.txt in HDFS with no warning
  • BThe file is uploaded and stored as a plain file named input
  • CYou get a warning that foo.txt is being overwritten
  • DYou get an error message telling you that foo.txt already exists, and asking you if you would like
  • EYou get a error message telling you that foo.txt already exists. The file is not written to HDFS
  • FYou get an error message telling you that input is not a directory
  • GThe write silently fails

How the community answered

(33 responses)
  • A
    9% (3)
  • B
    6% (2)
  • E
    82% (27)
  • F
    3% (1)

Community Discussion

No community discussion yet for this question.

Full CCA-500 Practice