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

ASF GitHub Bot commented on HDFS-17215:
---------------------------------------

ayushtkn commented on code in PR #6136:
URL: https://github.com/apache/hadoop/pull/6136#discussion_r1342501367


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/Quota.java:
##########
@@ -75,8 +75,10 @@ public Quota(Router router, RouterRpcServer server) {
    * @param storagespaceQuota Storage space quota.
    * @param type StorageType that the space quota is intended to be set on.
    * @param checkMountEntry whether to check the path is a mount entry.
-   * @throws AccessControlException If the quota system is disabled or if
+   * @throws IOException If the quota system is disabled or if
    * checkMountEntry is true and the path is a mount entry.
+   * By the way, this latter case actually throws an AccessControlException,
+   * which happens to be a subclass of IOException.

Review Comment:
   this isn't required I think,
   below it throws ACE directly as well
   ```
       if (checkMountEntry && isMountEntry(path)) {
         throw new AccessControlException(
             "Permission denied: " + RouterRpcServer.getRemoteUser()
                 + " is not allowed to change quota of " + path);
       }
   ```





> The setQuota method annotation of the Quota class has an error
> --------------------------------------------------------------
>
>                 Key: HDFS-17215
>                 URL: https://issues.apache.org/jira/browse/HDFS-17215
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: rbf
>    Affects Versions: 3.3.4
>            Reporter: xiaojunxiang
>            Priority: Minor
>              Labels: pull-request-available
>
> The setQuota method annotation of the Quota class has an error, which is 
> described in the @throws section.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to