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-4150) Update inode in blocksMap when deleting original/snapshot file
Date Tue, 06 Nov 2012 02:56:13 GMT

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

Tsz Wo (Nicholas), SZE commented on HDFS-4150:
----------------------------------------------

- We should change the parameter of collectSubtreeBlocksAndClear(..) to a new class instead
of Map<Block, BlockDeletionInfo> so the block replacement info can be iterated before
the block deletion info.  Let me create a JIRA to do it in trunk first.

- The INode replacement update may be delayed.  Then, the old inode may be used in replication.
 We need to handle the replication computation.

- The new BlockDeletionInfo object below should be created outside the loop since it is the
same for all the blocks.
{code}
//INodeFileWithLink.collectBlocksBeyondMaxAndClear(..)
+      // Replace the INode for all the remaining blocks in blocksMap
+      if (m != null) {
+        for (int i = 0; i < n; i++) {
+          BlockDeletionInfo info = new BlockDeletionInfo(this, next);
+          m.put(oldBlocks[i], info);
+        }
+      }
{code}

- BlockDeletionInfo is not a good name since the blocks are not going to be deleted, how about
renaming it to INodeReplacementInfo?

- There are some code duplicated in FSNamesystem.  Please put them it a method.

                
> Update inode in blocksMap when deleting original/snapshot file
> --------------------------------------------------------------
>
>                 Key: HDFS-4150
>                 URL: https://issues.apache.org/jira/browse/HDFS-4150
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4150.000.patch, HDFS-4150.001.patch, HDFS-4150.002.patch
>
>
> When deleting a file/directory, instead of directly removing all the corresponding blocks,
we should update inodes in blocksMap if there are snapshots for them.

--
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