zhaoyim commented on a change in pull request #2037:
URL: https://github.com/apache/hadoop/pull/2037#discussion_r450571072



##########
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:
       @Hexiaoqiao In my understand, the diff is after created a dir, the name 
quota is already 1 and the name quota count it self, but the space quota can be 
0.




----------------------------------------------------------------
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]

Reply via email to