[
https://issues.apache.org/jira/browse/HDFS-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14604844#comment-14604844
]
Surendra Singh Lilhore commented on HDFS-253:
---------------------------------------------
Hi All,
I am working on this jira and planning to do something like this.
1. Adding one new admin command for list quota information from given
path.
{noformat}
hdfs dfsadmin -listQuota -r -h <path>
{noformat}
This command will list the directories with quota information under the
given path. Here "-r" is for recursively list the quota information.
2. Adding one new API {{listQuotaInfo()}} in ClientProtocol.java for
retrieving quota information from namenode , It will return
{{DirectoriesQuotaInfo}}.
{noformat}
public DirectoriesQuotaInfo listQuotaInfo(String path, int next)
throws IOException;
{noformat}
{noformat}
public class DirectoriesQuotaInfo {
private final ContentSummary[] contentSummarys;
private final int next;
}
{noformat}
3. One API in FileSystem.java, it will return
{{RemoteIterator<ContentSummary>}}
{noformat}
public RemoteIterator<ContentSummary> listQuotaInfo(Path path)
throws IOException;
{noformat}
All the recursive logic I am implementing in admin command, {{listQuotaInfo()}}
API only return the list of ContentSummary from the give path for the
directories which has Quota.
Is this correct implementation? Please give suggestion.
> 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
>
> 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)