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

Jinglun commented on HDFS-14833:
--------------------------------

Hi [~ayushtkn] thanks for your quick reply. Sorry for my bad expression on 
point 2. About the nsQuota and ssQuota my thought is we can define the variable 
when assign value to them. So we can save 2 lines. Other than that it LGTM. 
{code:java}
private boolean isQuotaUpdated(UpdateMountTableEntryRequest request,
    MountTable mountTable) throws IOException {
  if (mountTable != null) {
    MountTable updateEntry = request.getEntry();
    if (!mountTable.getDestinations().equals(updateEntry.getDestinations())) {
      return true;
    }
    // Previous quota.
    RouterQuotaUsage preQuota = mountTable.getQuota();
    long nsQuota = preQuota.getQuota();
    long ssQuota = preQuota.getSpaceQuota();
    // New quota
    RouterQuotaUsage mountQuota = updateEntry.getQuota();
    if (nsQuota != mountQuota.getQuota()
        || ssQuota != mountQuota.getSpaceQuota()) {
      return true;
    }
  }
  return false;
}
{code}

> RBF: Router Update Doesn't Sync Quota
> -------------------------------------
>
>                 Key: HDFS-14833
>                 URL: https://issues.apache.org/jira/browse/HDFS-14833
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>         Attachments: HDFS-14833-01.patch, HDFS-14833-02.patch, 
> HDFS-14833-03.patch
>
>
> HDFS-14777 Added a check to prevent RPC call, It checks whether in the 
> present state whether quota is changing. 
> But ignores the part that if the locations are changed. if the location is 
> changed the new destination should be synchronized with the mount entry 
> quota. 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

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

Reply via email to