sunchao commented on a change in pull request #1253: HDFS-8631. WebHDFS :
Support setQuota
URL: https://github.com/apache/hadoop/pull/1253#discussion_r312327954
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
##########
@@ -1788,6 +1788,34 @@ public QuotaUsage getQuotaUsage(Path f) throws
IOException {
return getContentSummary(f);
}
+ /**
+ * Set quota for the given {@link Path}.
+ *
+ * @param src the target path to set quota for
+ * @param namespaceQuota the namespace quota (i.e., # of files/directories)
to set
+ * @param storagespaceQuota the storage space quota to set
+ * @throws IOException IO failure
+ */
+ public void setQuota(Path src, final long namespaceQuota,
+ final long storagespaceQuota) throws IOException {
+ throw new UnsupportedOperationException(getClass().getCanonicalName() +
Review comment:
Agree. Better to have a static method and make the error message
standardized. Not sure what you mean by getting the function name from the
stack trace though. I was thinking to just pass the method name to the static
helper method.
Do you want to do this cleanup in this JIRA, or address it separately in a
follow-up?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]