Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7285 Erasure Coding Support inside HDFS
  3. HDFS-8517

Fix a decoding issue in stripped block recovering in client side

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • HDFS-7285
    • None
    • None
    • Reviewed

    Description

      jingzhao reported a decoding issue in HDFS-8481 in the comment copied below:

      While debugging HDFS-8319, I just found that in TestWriteReadStripedFile#testWritePreadWithDNFailure, if we change the startOffsetInFile from cellSize * 5 to 0, the test fails with the following error msg:

      java.lang.AssertionError: Byte at 524288 should be the same expected:<27> but was:<-9>
      	at org.junit.Assert.fail(Assert.java:88)
      	at org.junit.Assert.failNotEquals(Assert.java:743)
      	at org.junit.Assert.assertEquals(Assert.java:118)
      	at org.junit.Assert.assertEquals(Assert.java:555)
      	at org.apache.hadoop.hdfs.TestWriteReadStripedFile.testWritePreadWithDNFailure(TestWriteReadStripedFile.java:390)
      

      It was caused by an issue that we need to adjust the inputs order to call decoder#decode. When startOffsetInFile is 5 * cellSize, the recovering or decoding won't be needed as ZERO cells don't need to recover; when it's 0, the issue then was exposed, as normal data cells must be recovered thru the decoding.

      Attachments

        1. HDFS-8517-HDFS-7285-v1.patch
          21 kB
          Kai Zheng
        2. HDFS-8517-HDFS-7285.v2.patch
          30 kB
          Jing Zhao

        Activity

          People

            drankye Kai Zheng
            drankye Kai Zheng
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: