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

Xiaoyu Yao commented on HDFS-7723:
----------------------------------

Thanks [~arpitagarwal] again for the review. 

bq. Since the file no longer exists outside the snapshot and we compute quota 
usage based on intention, what is the intended per-type quota usage of the 
directory? My guess is no quota should be used. Could you please confirm?
The directory with snapshot feature maintains a snapshot copy of INode for file 
that is deleted from namespace but exists in snapshot. This is documented in 
INode#cleanSubtree(). The reclaim of storage type quota works the same way as 
space quota in the case. The intended per-type quota usage is calculated based 
on policy of the parent directory and the file size. I've added modify the 
current testQuotaByStorageTypeWithSnapshot. The test validates that SSD usage 
won't be reclaimed until the last snapshot that contains the file is deleted. 

bq. So two follow up Jiras - one for refactoring/renaming and one for tests.
HDFS-7775 and HDFS-7776 are opened for refactoring/renaming and additional unit 
tests, respectively. I've already added 2 additional unit tests in the patch 
V5. One for the case you proposed above and one for the truncate. 

bq. Nitpicks on TestQuotaByStorageType.java:
Patch v5 will fix the TestQuotaByStorageType issues mentioned. 

> Quota By Storage Type namenode implemenation
> --------------------------------------------
>
>                 Key: HDFS-7723
>                 URL: https://issues.apache.org/jira/browse/HDFS-7723
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>            Reporter: Xiaoyu Yao
>            Assignee: Xiaoyu Yao
>         Attachments: HDFS-7723.0.patch, HDFS-7723.1.patch, HDFS-7723.2.patch, 
> HDFS-7723.3.patch, HDFS-7723.4.patch
>
>
> This includes: 1) new editlog to persist quota by storage type op 2) 
> corresponding fsimage load/save the new op. 3) QuotaCount refactor to update 
> usage of the storage types for quota enforcement 4) Snapshot support 5) Unit 
> test update



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to