nerdexam
Huawei

H13-723_V2.0 · Question #38

There is a file test.txt in the root directory of the HDFS cluster. Which of the following commands can check the DatNode node information stored in this file?

The correct answer is B. hdfs fsck /test.txt -locations. hdfs fsck /test.txt -locations is correct because the -locations flag explicitly outputs the DataNode addresses where each block of the file is stored, directly answering "which DataNodes hold this file." A (-files) is wrong - it displays file-level metadata (name, size…

Distributed Storage Development (HDFS, HBase)

Question

There is a file test.txt in the root directory of the HDFS cluster. Which of the following commands can check the DatNode node information stored in this file?

Options

  • Ahdfs fsck /test.txt -files
  • Bhdfs fsck /test.txt -locations
  • Chdfs fsck /test.txt -blocks
  • Dhdfs fsck /test.txt -list -corruptfileblocks

How the community answered

(45 responses)
  • A
    2% (1)
  • B
    78% (35)
  • C
    13% (6)
  • D
    7% (3)

Explanation

hdfs fsck /test.txt -locations is correct because the -locations flag explicitly outputs the DataNode addresses where each block of the file is stored, directly answering "which DataNodes hold this file."

  • A (-files) is wrong - it displays file-level metadata (name, size, replication factor) but omits block placement and DataNode details.
  • C (-blocks) is wrong - it prints the block report (block IDs, sizes, replication counts) without revealing which DataNodes actually host those blocks.
  • D (-list -corruptfileblocks) is wrong - -list-corruptfileblocks is a diagnostic flag for finding corrupted blocks, unrelated to inspecting healthy file placement.

Memory tip: Think of -locations as asking HDFS "where physically are the blocks?" - the answer is always a DataNode address. If you want DataNode info, you need location info.

Topics

#HDFS#fsck command#DataNode#block locations

Community Discussion

No community discussion yet for this question.

Full H13-723_V2.0 Practice