hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron T. Myers (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=13491158#comment-13491158

Aaron T. Myers commented on HDFS-4150:

Hi Jing, in general the patch looks pretty good to me. I just have one little concern. There's
two places where this patch contains code like this:

if (originalBlockInfo != null
    && toDelete == originalBlockInfo.getBlockCollection()) {

I'm concerned by the use of "==" here, instead of ".equals" or the like. Are we in fact guaranteed
that the same actual object reference will be used in both places? (I think this is probably
fine as-is, I just want to make sure.) Also, you might want to add a comment above this code
saying why replacing the BlockCollection in the blocks map is appropriate in this case, i.e.
in the case of a snapshot existing which still references this block.
> 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

View raw message