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

Yiqun Lin commented on HDFS-13346:
----------------------------------

Hi [~liuhongtong], thanks for filling this! Just take a quick look, current 
change won't fix this. {{currentQuotaUsage}} won't get ns quota value of 
subclusters. It's constructed by following codes:
{code:java}
    QuotaUsage.Builder builder = new QuotaUsage.Builder()
        .fileAndDirectoryCount(nsCount).spaceConsumed(ssCount);
    if (hasQuotaUnSet) {
      builder.quota(HdfsConstants.QUOTA_DONT_SET);
    }
{code}
It's only used to check if there are some subcluster which don't have quota 
set. Then we do the initial setting.
 One better way is that we invoke update operation {{this.rpcServer.setQuota}} 
in {{RouterAdminServer}}, not in {{RouterQuotaUpdateService}}.

> RBF: Fix synchronization of router quota and ns quota
> -----------------------------------------------------
>
>                 Key: HDFS-13346
>                 URL: https://issues.apache.org/jira/browse/HDFS-13346
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: liuhongtong
>            Assignee: liuhongtong
>            Priority: Major
>         Attachments: HDFS-13346.001.patch, HDFS-13346.002.patch
>
>
> Check Router Quota and ns Quota:
> {code}
> $ hdfs dfsrouteradmin -ls /ns10t
> Mount Table Entries:
> Source                    Destinations              Owner                     
> Group                     Mode                      Quota/Usage              
> /ns10t                    ns10->/ns10t              hadp                      
> hadp                      rwxr-xr-x                 [NsQuota: 150/319, 
> SsQuota: -/-]
> /ns10t/ns1mountpoint      ns1->/a/tt                hadp                      
> hadp                      rwxr-xr-x                 [NsQuota: -/-, SsQuota: 
> -/-]
> $ hdfs dfs -count -q hdfs://ns10/ns10t
>          150            -155            none             inf            3     
>      302                  0 hdfs://ns10/ns10t
> {code}
> Update Router Quota:
> {code:java}
> $ hdfs dfsrouteradmin -setQuota /ns10t -nsQuota 400
> Successfully set quota for mount point /ns10t
> {code}
> Check Router Quota and ns Quota:
> {code:java}
> $ hdfs dfsrouteradmin -ls /ns10t
> Mount Table Entries:
> Source                    Destinations              Owner                     
> Group                     Mode                      Quota/Usage              
> /ns10t                    ns10->/ns10t              hadp                      
> hadp                      rwxr-xr-x                 [NsQuota: 400/319, 
> SsQuota: -/-]
> /ns10t/ns1mountpoint      ns1->/a/tt                hadp                      
> hadp                      rwxr-xr-x                 [NsQuota: -/-, SsQuota: 
> -/-]
> $ hdfs dfs -count -q hdfs://ns10/ns10t
>          150            -155            none             inf            3     
>      302                  0 hdfs://ns10/ns10t
> {code}
> Now Router Quota has updated successfully, but ns Quota not.
>  



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

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

Reply via email to