[ https://issues.apache.org/jira/browse/HDFS-570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tsz Wo (Nicholas), SZE updated HDFS-570: ---------------------------------------- Description: In order to support read consistency, DFSClient needs the file length at the file opening time. In the current implmentation, DFSClient obtains the file length at the file opening time but the length is inaccurate if the file is being written. For more details, see Section 4 in the [append design doc|https://issues.apache.org/jira/secure/attachment/12415768/appendDesign2.pdf]. was: In order to support read consistency, DFSClient needs the file length at the file opening time. For more details, see Section 4 in the [append design doc|https://issues.apache.org/jira/secure/attachment/12415768/appendDesign2.pdf]. In order to support reading a file when it is being written. I suggest to have the following changes: - DFSClient obtains all the block lengths from the namenode for the blocks is not under construction. Note that only the last block is possibly under construction. Other blocks must be finalized. - For the last block, if it is under construction, DFSClient obtains the block length from one of the datanode. > When opening a file for read, make the file length avaliable to client. > ----------------------------------------------------------------------- > > Key: HDFS-570 > URL: https://issues.apache.org/jira/browse/HDFS-570 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: hdfs client > Affects Versions: Append Branch > Reporter: Tsz Wo (Nicholas), SZE > Assignee: Tsz Wo (Nicholas), SZE > Fix For: Append Branch > > > In order to support read consistency, DFSClient needs the file length at the > file opening time. In the current implmentation, DFSClient obtains the file > length at the file opening time but the length is inaccurate if the file is > being written. > For more details, see Section 4 in the [append design > doc|https://issues.apache.org/jira/secure/attachment/12415768/appendDesign2.pdf]. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.