[ 
https://issues.apache.org/jira/browse/HDFS-878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798215#action_12798215
 ] 

Zheng Shao commented on HDFS-878:
---------------------------------

Instead of changing FileStatus which is incompatible, we can make 
NameNode.getListing return DFSFileStatus, which contains all fields of 
FileStatus plus some additional information like isUnderConstruction.

Because of byte-alignment, I should be able to get the same memory footprint by 
inserting it somewhere. Does that sound good Hairong?

Alternatively it's also possible for data node to send the latest size of a 
block in the heartbeat.


> FileStatus should have a field "isUnderConstruction"
> ----------------------------------------------------
>
>                 Key: HDFS-878
>                 URL: https://issues.apache.org/jira/browse/HDFS-878
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>
> Currently DFSClient has no way to know whether a file is under construction 
> or not, unless we open the file and get locatedBlocks (which is much more 
> costly).
> However, the namenode knows whether each INode is under construction or not.
> We should expose that information from NameNode.getListing(), to 
> DFSClient.listPaths(), to DistributedFileSystem.listStatus().
> We should also expose that information through DFSInputStream and 
> DFSDataInputStream if not there yet.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to