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

Surendra Singh Lilhore commented on HDFS-9229:
----------------------------------------------

Thanks [~zhz] for review..

bq. The behavior of shared directories is worth more discussions. The current 
patch returns 0 if the directory is shared. Since the purpose of this new 
metric is for local storage planning / provisioning, shall we report size of 
shared dirs as well?

Do we have any interface to get size of shared dirs in namenode ?.

bq. The temporary nnDirSizeMap is not necessary. I think we can directly clear 
and add to nameDirSizeMap.

This I did purposefully. Getting size for all the dir and updating in map will 
take some time because it is I/O call. Suppose we updated size for one dir and 
in-between some one read that map then he will get incomplete info.


> Expose size of NameNode directory as a metric
> ---------------------------------------------
>
>                 Key: HDFS-9229
>                 URL: https://issues.apache.org/jira/browse/HDFS-9229
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>    Affects Versions: 2.7.1
>            Reporter: Zhe Zhang
>            Assignee: Surendra Singh Lilhore
>            Priority: Minor
>         Attachments: HDFS-9229.001.patch, HDFS-9229.002.patch, 
> HDFS-9229.003.patch, HDFS-9229.004.patch, HDFS-9229.005.patch
>
>
> Useful for admins in reserving / managing NN local file system space. Also 
> useful when transferring NN backups.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to