Support Questions
Find answers, ask questions, and share your expertise

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

Solved Go to solution

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

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

Accepted Solutions

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

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

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

@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.

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

Thanks Neeraj

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

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

View solution in original post

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

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