Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8031 Follow-on work for erasure coding phase I (striping layout)
  3. HDFS-8376

Erasure Coding: Update last cellsize calculation according to whether the erasure codec has chunk boundary

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • None
    • None
    • None

    Description

      Current calculation for last cell size is as following. For parity cell, the last cell size is the same as the first data cell. But some erasure codec has chunk boundary, then the last cellsize for parity block is the codec chunk size.

      private static int lastCellSize(int size, int cellSize, int numDataBlocks,
            int i) {
          if (i < numDataBlocks) {
            // parity block size (i.e. i >= numDataBlocks) is the same as 
            // the first data block size (i.e. i = 0).
            size -= i*cellSize;
            if (size < 0) {
              size = 0;
            }
          }
          return size > cellSize? cellSize: size;
        }
      

      Attachments

        Activity

          People

            hitliuyi Yi Liu
            hitliuyi Yi Liu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: