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

Yiqun Lin edited comment on HDFS-13583 at 6/1/18 8:24 AM:
----------------------------------------------------------

[~dibyendu_hadoop], almost looks great. Three minor comments:

In *RouterAdmin.java* class,
{code:java}
      // If nsQuota and ssQuota were unset, clear nsQuota and ssQuota.
      if (nsQuota == HdfsConstants.QUOTA_DONT_SET &&
          ssQuota == HdfsConstants.QUOTA_DONT_SET) {
{code}
Use {{HdfsConstants.QUOTA_RESET}} instead.

In *RouterQuotaUsage.java*,
{code:java}
+ if (getSpaceQuota() == HdfsConstants.QUOTA_DONT_SET ||
+        getQuota() == HdfsConstants.QUOTA_RESET) {
{code}
{{getQuota()}} should be {{getSpaceQuota}}.

In *RouterQuotaManager.java*:
{code:java}
// once nsQuota or ssQuota was set, this mount table is quota set
      if (nsQuota != HdfsConstants.QUOTA_DONT_SET
          || ssQuota != HdfsConstants.QUOTA_DONT_SET) {
        return true;
      }
{code}
We should add the additional check:
{code:java}
 // once nsQuota or ssQuota was set, this mount table is quota set
      if ((nsQuota != HdfsConstants.QUOTA_DONT_SET && nsQuota != 
HdfsConstants.QUOTA_RESET)
          || (ssQuota != HdfsConstants.QUOTA_DONT_SET && ssQuota != 
HdfsConstants.QUOTA_RESET)) {
        return true;
      }
{code}


was (Author: linyiqun):
[~dibyendu_hadoop], almost looks great. Two minor comments:

In *RouterAdmin.java* class,
{code}
      // If nsQuota and ssQuota were unset, clear nsQuota and ssQuota.
      if (nsQuota == HdfsConstants.QUOTA_DONT_SET &&
          ssQuota == HdfsConstants.QUOTA_DONT_SET) {
{code}
Use {{HdfsConstants.QUOTA_RESET}} instead.

In *RouterQuotaUsage.java*,
{code}
+ if (getSpaceQuota() == HdfsConstants.QUOTA_DONT_SET ||
+        getQuota() == HdfsConstants.QUOTA_RESET) {
{code}
{{getQuota()}} should be {{getSpaceQuota}}.


> RBF: Router admin clrQuota is not synchronized with nameservice
> ---------------------------------------------------------------
>
>                 Key: HDFS-13583
>                 URL: https://issues.apache.org/jira/browse/HDFS-13583
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Dibyendu Karmakar
>            Assignee: Dibyendu Karmakar
>            Priority: Major
>         Attachments: HDFS-13583-000.patch
>
>
> Router admin -clrQuota command is removing the quota from the mount table 
> only, it is not getting synchronized with nameservice.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to