hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron T. Myers (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-3000) Add a public API for setting quotas
Date Wed, 28 Mar 2012 23:49:28 GMT

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

Aaron T. Myers commented on HDFS-3000:
--------------------------------------

bq. On one hand quotas are not HDFS-specific, so fine moving them out of DistributedFileSystem.
The quota interface isn't entirely generic, eg I'm not sure other file systems would combine
the namespace and diskspace values in one API, but I suspect it's reasonably generic enough
to be useful by another FS.

This was my thinking as well.

bq. On the other FileSystem, nor FileContext which would also need this, doesn't currently
have an administrative-level interface (which quotas are). Would it be better instead to have
a new public class for administrative-level APIs that is public / maintained? Eg in the same
way we have haadmin and dfshaadmin, have both a generic and hdfs-specific dfs admin classes,
and make the new one generic and public?

I agree with you that HDFS could stand to have some public administrative API, for example
to get/set safe mode, but I don't think setQuotas should belong in that API for a few reasons:

# I don't think it's necessarily an "administrative command" per se. At least, I don't see
why there's a meaningful distinction between setting quotas and, say, chown.
# There'd still be the issue of the asymmetry between having to get quotas via FileSystem,
but set them via some other interface, which seems goofy to me.

Does this reasoning make sense?

You make a good point about FileContext. I'll add that to the patch.
                
> Add a public API for setting quotas
> -----------------------------------
>
>                 Key: HDFS-3000
>                 URL: https://issues.apache.org/jira/browse/HDFS-3000
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs client
>    Affects Versions: 0.23.1
>            Reporter: Aaron T. Myers
>            Assignee: Aaron T. Myers
>
> Currently one can set the quota of a file or directory from the command line, but if
a user wants to set it programmatically, they need to use DistributedFileSystem, which is
annotated InterfaceAudience.Private.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message