[ 
https://issues.apache.org/jira/browse/HDFS-14568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jinglun updated HDFS-14568:
---------------------------
    Description: 
At present when the storage policy of a directory or a file is changed, we just 
simply change the recorded policy. But the change of storage policy also change 
the consume, and that will cause violation of Quota, and cause the consume 
recorded in DirectoryWithQuotaFeature out of date. 

We should do the quota check and consume update when setStoragePolicy():
 # Compute the new consume and check quota on ancestors. If quota exceed 
throwing the QuotaExceedException. Else go to 2.
 # Update the consume to all ancestors with Quota.

 

Related to HDFS-14633,  see HDFS-14633 to get more discussions.

 

  was:
At present when the storage policy of a directory or a file is changed, we just 
simply change the recorded policy. But the change of storage policy also change 
the consume, and that will cause violation of Quota, and cause the consume 
recorded in DirectoryWithQuotaFeature out of date. 

We should do the quota check and consume update when setStoragePolicy(), when 
the rpc happens:
 # Compute the new consume and check quota on ancestors. If quota exceed 
throwing the QuotaExceedException. Else go to 2.
 # Update the consume to all ancestors with Quota.

 

Related to HDFS-14633,  see HDFS-14633 to get more discussions.

 


> setStoragePolicy should check quota and update consume on storage type quota.
> -----------------------------------------------------------------------------
>
>                 Key: HDFS-14568
>                 URL: https://issues.apache.org/jira/browse/HDFS-14568
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: 3.1.0
>            Reporter: Jinglun
>            Assignee: Jinglun
>            Priority: Major
>              Labels: imcompatible
>         Attachments: HDFS-14568-001.patch, HDFS-14568-unit-test.patch, 
> HDFS-14568.002.patch, HDFS-14568.003.patch, HDFS-14568.004.patch
>
>
> At present when the storage policy of a directory or a file is changed, we 
> just simply change the recorded policy. But the change of storage policy also 
> change the consume, and that will cause violation of Quota, and cause the 
> consume recorded in DirectoryWithQuotaFeature out of date. 
> We should do the quota check and consume update when setStoragePolicy():
>  # Compute the new consume and check quota on ancestors. If quota exceed 
> throwing the QuotaExceedException. Else go to 2.
>  # Update the consume to all ancestors with Quota.
>  
> Related to HDFS-14633,  see HDFS-14633 to get more discussions.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to