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 22:39:27 GMT

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

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

I've given this some thought and come to the conclusion that we should just add {{setQuota(Path
p, long nsQuota, long dsQuota)}} to the public interface of o.a.h.fs.FileSystem. Doing so
shouldn't be incompatible, as we're just adding a net new method.

The concept of a quota is already somewhat exposed in o.a.h.fs.FileSystem, since {{getContentSummary(Path)}}
is included in FileSystem, which returns an object containing quota information. FileSystem
implementations which don't support quotas return "-1" for the quota fields. We could either
add a no-op default implementation of {{setQuota(...)}} to FileSystem, or add a default implementation
that throws an UnsupportedOperationException, as is done for {{o.a.h.fs.FileSystem#listCorruptFileBlocks}}.

If people are OK with this proposal, I'll whip up a patch real quick.
                
> 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