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

Zhe Zhang commented on HDFS-8077:
---------------------------------

Thanks for the explanation Jing. I spent some more time looking at the original 
{{BlockToMarkCorrupt}} code and was confused why the second constructor doesn't 
make a copy of {{stored}} but the 3rd constructor does. Should both make a copy?
{code}
    BlockToMarkCorrupt(BlockInfoContiguous corrupted,
        BlockInfoContiguous stored, String reason,
        Reason reasonCode) {
      Preconditions.checkNotNull(corrupted, "corrupted is null");
      Preconditions.checkNotNull(stored, "stored is null");

      this.corrupted = corrupted;
      this.stored = stored;
      this.reason = reason;
      this.reasonCode = reasonCode;
    }

    BlockToMarkCorrupt(BlockInfoContiguous stored, String reason,
        Reason reasonCode) {
      this(stored, stored, reason, reasonCode);
    }

    BlockToMarkCorrupt(BlockInfoContiguous stored, long gs, String reason,
        Reason reasonCode) {
      this(new BlockInfoContiguous(stored), stored, reason, reasonCode);
      //the corrupted block in datanode has a different generation stamp
      corrupted.setGenerationStamp(gs);
    }
{code}

> Erasure coding: fix bug in EC zone and symlinks
> -----------------------------------------------
>
>                 Key: HDFS-8077
>                 URL: https://issues.apache.org/jira/browse/HDFS-8077
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Zhe Zhang
>            Assignee: Jing Zhao
>         Attachments: HDFS-8077-000.patch, HDFS-8077.001.patch
>
>
> EC zone manager tries to get XAttr of an inode to determine the EC policy, 
> which doesn't work with symlinks. This patch has a simple fix to get rid of 
> test failures.
> Ideally we should also add logic to disallow creating symlinks in several 
> EC-related scenarios. But since symlinks are disabled in branch-2 and will 
> likely be disabled in trunk, this step is skipped now.
> The patch also fixes a small test error around {{getBlockReplication}}



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

Reply via email to