[ https://issues.apache.org/jira/browse/HDFS-14777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16917647#comment-16917647 ]
Surendra Singh Lilhore commented on HDFS-14777: ----------------------------------------------- Thanks [~RANith] for patch. This issue is not there in trunk code because HDFS-14661 added one try catch for {{synchronizeQuota()}} call and catch all the exception. Anyway we should fix this, if no change in quota it should not try to update it. Some comments for your patch. 1. {{router.isQuotaEnabled()}}, first this check should be done before checking old quota. {code:java} if (router.isQuotaEnabled() && this.router.getSubclusterResolver() instanceof MountTableResolver) { ...................... ...................... }{code} 2. Admin can set space quota and name quota separetly, to here "||" condition is required. {code:java} if (mountTable != null && router.isQuotaEnabled() && (nsQuota != mountTable.getQuota().getQuota() || ssQuota != mountTable.getQuota().getSpaceQuota())){ synchronizeQuota(mountTable.getSourcePath(), mountTable.getQuota() .getQuota(), mountTable.getQuota().getSpaceQuota()); } {code} 3. This is not related to your patch, but try catch should catch expected exception not all. If you want to handle it in different patch then also it is fine. > RBF: Set ReadOnly is failing for mount Table but actually readonly succed to > set > -------------------------------------------------------------------------------- > > Key: HDFS-14777 > URL: https://issues.apache.org/jira/browse/HDFS-14777 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Ranith Sardar > Assignee: Ranith Sardar > Priority: Major > Attachments: HDFS-14777.001.patch > > > # hdfs dfsrouteradmin -update /test hacluster /test -readonly /opt/client # > hdfs dfsrouteradmin -update /test hacluster /test -readonly update: /test is > in a read only mount > pointorg.apache.hadoop.ipc.RemoteException(java.io.IOException): /test is in > a read only mount point at > org.apache.hadoop.hdfs.server.federation.router.RouterRpcServer.getLocationsForPath(RouterRpcServer.java:1419) > at > org.apache.hadoop.hdfs.server.federation.router.Quota.getQuotaRemoteLocations(Quota.java:217) > at > org.apache.hadoop.hdfs.server.federation.router.Quota.setQuota(Quota.java:75) > at > org.apache.hadoop.hdfs.server.federation.router.RouterAdminServer.synchronizeQuota(RouterAdminServer.java:288) > at > org.apache.hadoop.hdfs.server.federation.router.RouterAdminServer.updateMountTableEntry(RouterAdminServer.java:267) -- This message was sent by Atlassian Jira (v8.3.2#803003) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org