Created 02-03-2016 09:15 PM
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?
Created 02-03-2016 11:28 PM
Hi @Avinash C, the HDFS Architecture guide has a good description of the write pipeline (section 8.3.1.).
Created 02-03-2016 09:18 PM
@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.
Created 02-04-2016 07:44 PM
Thanks Neeraj
Created 02-03-2016 11:28 PM
Hi @Avinash C, the HDFS Architecture guide has a good description of the write pipeline (section 8.3.1.).
Created 02-04-2016 07:44 PM
Thanks Arpit. The section 8.3.1 was a very good read.