Uploaded image for project: 'Apache Tez'
  1. Apache Tez
  2. TEZ-3937

Empty partition BitSet to byte[] conversion creates one extra byte in rounding error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.2, 0.10.0
    • None
    • None
    • Reviewed

    Description

      Byte array length calculation is defined as (bitset.length / 8) + 1 which has off by one errors on byte boundaries. For example, BitSet of length 0 is converted to a byte array of length 1. This was introduced as part of TEZ-972 since BitSet.toByteArray and valueOf were not supported as Tez supported Java 6 at the time and API was introduced in Java 7.

      Attachments

        1. TEZ-3937.001.patch
          2 kB
          Jonathan Turner Eagles
        2. TEZ-3937.002.patch
          2 kB
          Jonathan Turner Eagles

        Activity

          People

            jeagles Jonathan Turner Eagles
            jeagles Jonathan Turner Eagles
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: