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

Zhe Zhang commented on HDFS-8479:
---------------------------------

Thanks Jing. I was about the include the following change:
{code}
  /**
   * Decode based on the given input buffers and schema
   */
  public static void decodeAndFillBuffer(final byte[][] decodeInputs, byte[] 
buf,
      AlignedStripe alignedStripe, int dataBlkNum, int parityBlkNum) {
    int[] decodeIndices = new int[parityBlkNum];
    int pos = 0;
    for (int i = 0; i < alignedStripe.chunks.length; i++) {
      if (alignedStripe.chunks[i].state != StripingChunk.FETCHED &&
          alignedStripe.chunks[i].state != StripingChunk.ALLZERO) {
        decodeIndices[pos++] = i;
        decodeInputs[i] = null;
      }
    }
{code}

Basically,  HADOOP-11847 requires us to leave to-be-decoded slots as null.

> Erasure coding: fix striping related logic in FSDirWriteFileOp to sync with 
> HDFS-8421
> -------------------------------------------------------------------------------------
>
>                 Key: HDFS-8479
>                 URL: https://issues.apache.org/jira/browse/HDFS-8479
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Zhe Zhang
>            Assignee: Zhe Zhang
>             Fix For: HDFS-7285
>
>         Attachments: HDFS-8479-HDFS-7285.0.patch
>
>




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

Reply via email to