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

Allen Wittenauer commented on HDFS-8625:
----------------------------------------

bq. Why we need to display file and directory count in MB and GB ??

The whole reason this feature exists is because admins that do the work with 
count and setXQuota want to do it in round numbers.  I don't have enough 
fingers and toes to say how many times I've had to "add commas" from this 
display to figure out what the magnitudes actually are.  When dealing with 
terabyte and larger sizes, -h is invaluable for *all* of the numbers.

It's worth pointing out that setXQuota also takes these abbreviations.  So 
there is a consistently thing happening as well.

If there's a bug here, it's that one billion, it should be displaying B and 
instead of G, but that's pretty minor.


> count with -h option displays namespace quota in human readable format
> ----------------------------------------------------------------------
>
>                 Key: HDFS-8625
>                 URL: https://issues.apache.org/jira/browse/HDFS-8625
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>            Reporter: Archana T
>            Assignee: Surendra Singh Lilhore
>         Attachments: HDFS-8625.patch
>
>
> When 'count' command is executed with '-h' option , namespace quota is 
> displayed in human readable format --
> Example :
> hdfs dfsadmin -setQuota {color:red}1048576{color} /test
> hdfs dfs -count -q -h -v /test
>        {color:red}QUOTA       REM_QUOTA{color}     SPACE_QUOTA 
> REM_SPACE_QUOTA    DIR_COUNT   FILE_COUNT       CONTENT_SIZE PATHNAME
>          {color:red}1 M           1.0 M{color}            none             
> inf            1            0                  0 /test
> QUOTA and REM_QUOTA shows 1 M (human readable format) which actually should 
> give count value 1048576



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

Reply via email to