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

Fix DFSStripedOutputStream#getCurrentBlockGroupBytes when the last stripe is at the block group boundary

    XMLWordPrintableJSON

Details

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

    Description

      Currently DFSStripedOutputStream#getCurrentBlockGroupBytes simply uses getBytesCurBlock of each streamer to calculate the block group size. This is wrong when the last stripe is at the block group boundary, since the bytesCurBlock is set to 0 if an internal block is finished.

      For example, when the real block size is blockGroupSize - cellSize * (numDataBlocks - 1), i.e., the first internal block is full while the others are not, the getCurrentBlockGroupBytes returns wrong result and cause the write to fail.

      Attachments

        Activity

          People

            jingzhao Jing Zhao
            jingzhao Jing Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: