[
https://issues.apache.org/jira/browse/HDFS-4563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13599578#comment-13599578
]
Tsz Wo (Nicholas), SZE commented on HDFS-4563:
----------------------------------------------
On a second thought, we don't have to change Diff and Processor at all. We
only have to change the Processor implementation in DirectoryDiff, i.e.
{code}
//DirectoryDiff
@Override
Quota.Counts combinePosteriorAndCollectBlocks(
final INodeDirectory currentDir, final DirectoryDiff posterior,
final BlocksMapUpdateInfo collectedBlocks) {
final Quota.Counts counts = Quota.Counts.newInstance();
diff.combinePosterior(posterior.diff, new Diff.Processor<INode>() {
/** Collect blocks for deleted files. */
@Override
public void process(INode inode) {
if (inode != null) {
inode.computeQuotaUsage(counts, false);
inode.destroyAndCollectBlocks(collectedBlocks);
}
}
});
return counts;
}
{code}
> Update namespace/diskspace after deleting snapshots
> ---------------------------------------------------
>
> Key: HDFS-4563
> URL: https://issues.apache.org/jira/browse/HDFS-4563
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: datanode, namenode
> Reporter: Jing Zhao
> Assignee: Jing Zhao
> Attachments: HDFS-4563.001.patch, HDFS-4563.002.patch
>
>
> 1. Update namespace/diskspace after deleting snapshots
> 2. Compute quota usage when an INodeDirectoryWithSnapshot is first assigned
> with quota
> 3. Add more unit tests covering quota usage computation
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira