Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

During HDFS write mechanism - acknowledgement report is sent for each block written or only when all blocks are written?

avatar
Rising Star

In HDFS write, consider am writing a file of 1GB with 64MB as block size, then 16 blocks are created. I want to know whether, acknowledgement report is sent to Client for each block written or only when all blocks are written?

1 ACCEPTED SOLUTION

avatar

Hi @Avinash C, the HDFS Architecture guide has a good description of the write pipeline (section 8.3.1.).

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@Avinash C Namenode receives the confirmation as soon as block is written. very nicely explained here

Step 1: The client creates the file by calling create() method on DistributedFileSystem.

Step 2: DistributedFileSystem makes an RPC call to the namenode to create a new file in the filesystem’s namespace, with no blocks associated with it.

The namenode performs various checks to make sure the file doesn’t already exist and that the client has the right permissions to create the file. If these checks pass, the namenode makes a record of the new file; otherwise, file creation fails and the client is thrown an IOException. TheDistributedFileSystem returns an FSDataOutputStream for the client to start writing data to.

avatar
Rising Star

Thanks Neeraj

avatar

Hi @Avinash C, the HDFS Architecture guide has a good description of the write pipeline (section 8.3.1.).

avatar
Rising Star

Thanks Arpit. The section 8.3.1 was a very good read.