Hexiaoqiao commented on a change in pull request #2037:
URL: https://github.com/apache/hadoop/pull/2037#discussion_r450336435
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
##########
@@ -2553,16 +2553,17 @@ void setQuota(String src, long namespaceQuota, long
storagespaceQuota)
throws IOException {
checkOpen();
// sanity check
- if ((namespaceQuota <= 0 &&
- namespaceQuota != HdfsConstants.QUOTA_DONT_SET &&
- namespaceQuota != HdfsConstants.QUOTA_RESET) ||
- (storagespaceQuota < 0 &&
+ if (namespaceQuota <= 0 &&
+ namespaceQuota != HdfsConstants.QUOTA_DONT_SET &&
+ namespaceQuota != HdfsConstants.QUOTA_RESET){
+ throw new IllegalArgumentException("Invalid values for " +
+ "namespace quota : " + namespaceQuota);
+ }
+ if (storagespaceQuota < 0 &&
Review comment:
Thanks @zhaoyim for your explanation. But I am still confused why this
condition is different with `namespacequota`? Sorry I do not find user manuals
about set*Quota.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]