0 votes
in HDFS by
How data or a file is written into HDFS?

1 Answer

0 votes
by

The best way to answer this question is to take an example of a client and list the steps that will happen while performing the write without going into much of the details:

Suppose a client wants to write a file into HDFS. So, the following steps will be performed internally during the whole HDFS write process:

The client will divide the files into blocks and will send a write request to the NameNode.

For each block, the NameNode will provide the client a list containing the IP address of DataNodes (depending on replication factor, 3 by default) where the data block has to be copied eventually.

The client will copy the first block into the first DataNode and then the other copies of the block will be replicated by the DataNodes themselves in a sequential manner.

Related questions

0 votes
asked Jun 8, 2020 in HDFS by Robindeniel
0 votes
asked Dec 21, 2022 in HDFS by Robin
...