hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4563) Update namespace/diskspace after deleting snapshots
Date Tue, 12 Mar 2013 01:41:12 GMT

    [ 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

Mime
View raw message