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

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

Little change in above implementation.

1. We already have {{Count}} command for getting the quota information. Same I 
added one new command {{listCount}} to get the content summary from HDFS.

{code}
 ./hdfd dfs -listCount [-q [-n | -s] ] [-h] [-r] [-v] <path> 

  List the directories with the quotas, directories, files and bytes count under
  the paths
  The -q option displays quotas.
  The -n option displays only name quota. It must be used with -q option.
  The -s option displays only space quota. It must be used with -q option.
  The -h option shows file sizes in human readable format.
  The -v option displays a header line.
{code}

2. Added one new API {{listContentSummary()}} in ClientProtocol.java for 
retrieving {{ContentSummary}} from namenode , It will return 
DirectoriesContentSummary.

3. Added one new API in FileSystem.java, it will return 
RemoteIterator<ContentSummary>.
{code}
        public RemoteIterator<ContentSummary> listContentSummary(Path path, 
boolean recurcive
{code}

> Method to retrieve all quotas active on HDFS
> --------------------------------------------
>
>                 Key: HDFS-253
>                 URL: https://issues.apache.org/jira/browse/HDFS-253
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: namenode
>            Reporter: Marco Nicosia
>            Assignee: Surendra Singh Lilhore
>              Labels: newbie
>         Attachments: HDFS-253.patch
>
>
> Currently the only way to view quota information on an HDFS is via dfs -count 
> -q, which is fine when an admin is examining a specific directory for quota 
> status.
> It would also be good to do full HDFS quota audits, by pulling all HDFS 
> quotas currently set on the system. This is especially important when trying 
> to do capacity management ("OK, how much quota have we allotted so far?"). I 
> think the only way to do this now is via lsr | count -q, which is pretty 
> cumbersome.



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

Reply via email to