PrepAway - Latest Free Exam Questions & Answers

Which of the following statements best describes how a large (100 GB) file is stored in HDFS?

Which of the following statements best describes how a large (100 GB) file is stored in HDFS?

PrepAway - Latest Free Exam Questions & Answers

A.
The file is divided into variable size blocks, which are stored on multiple data nodes. Each block
is replicated three times by default.

B.
The file is replicated three times by default. Eachcopy of the file is stored on a separate
datanodes.

C.
The master copy of the file is stored on a single datanode. The replica copies are divided into
fixed-size blocks, which are stored on multiple datanodes.

D.
The file is divided into fixed-size blocks, which are stored on multiple datanodes. Each block is
replicated three times by default. Multiple blocks from the same file might reside on the same
datanode.

E.
The file is divided into fixed-size blocks, which are stored on multiple datanodes. Each block is
replicated three times by default.HDFS guarantees that different blocks from the same file are
never on the same datanode.

Explanation:
HDFS is designed to reliably store very large files across machines in a large
cluster. It stores each file as a sequence of blocks; all blocks in a file except the last block are the
same size. The blocks of a file are replicated for fault tolerance. The block size and replication
factor are configurable per file. An application can specify the number of replicas of a file. The
replication factor can be specified at file creation time and can be changed later. Files in HDFS are
write-once and have strictly one writer at any time. The NameNode makes all decisions regarding
replication of blocks. HDFS uses rack-aware replica placement policy. In default configuration
there are total 3 copies of a datablock on HDFS, 2 copies are stored on datanodes on same rack
and 3rd copy on a different rack.
Reference:24 Interview Questions & Answers for Hadoop MapReduce developers,How the HDFS
Blocks are replicated?

8 Comments on “Which of the following statements best describes how a large (100 GB) file is stored in HDFS?


Leave a Reply to yogeswaran Cancel reply

Your email address will not be published. Required fields are marked *