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

Tsz Wo (Nicholas), SZE commented on HDFS-4772:
----------------------------------------------

bq. optional uint32 childrenNum = 14 [default = 0];

If we set the default to 0, we cannot tell if it indeed does not have children 
or not.  How about setting the default to -1?
                
> Add number of children in HdfsFileStatus
> ----------------------------------------
>
>                 Key: HDFS-4772
>                 URL: https://issues.apache.org/jira/browse/HDFS-4772
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>    Affects Versions: 3.0.0
>            Reporter: Brandon Li
>            Assignee: Brandon Li
>            Priority: Minor
>             Fix For: 3.0.0, 2.1.0-beta, 2.3.0
>
>         Attachments: HDFS-4772.2.patch, HDFS-4772.3.patch, 
> HDFS-4772.branch-2.patch, HDFS-4772.patch
>
>
> This JIRA is to track the change to return the number of children for a 
> directory, so the client doesn't need to make a getListing() call to 
> calculate the number of dirents. This makes it convenient for the client to 
> check directory size change.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to