xicm commented on a change in pull request #3634:
URL: https://github.com/apache/hadoop/pull/3634#discussion_r751066665



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/Quota.java
##########
@@ -50,7 +50,7 @@ public static Counts newInstance() {
    * The quota is violated if quota is set and usage > quota.
    */
   public static boolean isViolated(final long quota, final long usage) {
-    return quota >= 0 && usage > quota;
+    return quota >= 0 && usage >= quota;

Review comment:
       Sorry for taking so long to update, I checked the code, router checks 
quota at getLocationsForPath, it is difficult to get  a delta. Here is the 
trace based on 3.3.0
   ```
   org.apache.hadoop.hdfs.protocol.NSQuotaExceededException: The NameSpace 
quota (directories and files) is exceeded: quota=3 file count=4
        at 
org.apache.hadoop.hdfs.server.federation.router.RouterQuotaUsage.verifyNamespaceQuota(RouterQuotaUsage.java:100)
        at 
org.apache.hadoop.hdfs.server.federation.router.RouterRpcServer.getLocationsForPath(RouterRpcServer.java:1535)
        at 
org.apache.hadoop.hdfs.server.federation.router.RouterRpcServer.getLocationsForPath(RouterRpcServer.java:1475)
        at 
org.apache.hadoop.hdfs.server.federation.router.RouterClientProtocol.create(RouterClientProtocol.java:286)
        at 
org.apache.hadoop.hdfs.server.federation.router.RouterRpcServer.create(RouterRpcServer.java:611)
        at 
org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.create(ClientNamenodeProtocolServerSideTranslatorPB.java:494)
        at 
org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
        at 
org.apache.hadoop.ipc.ProtobufRpcEngine2$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine2.java:532)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1070)
        at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:1020)
        at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:948)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1845)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2952)
   ```




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

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to