Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-8085

Backport the fix for Bytes.toStringBinary() into 94 (HBASE-6991)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.94.5
    • 0.94.6
    • util
    • None
    • Incompatible change, Reviewed
    • Hide
      This patch changes Bytes.toStringBinary() and Bytes.toBytesBinary() to escape the character "\". Unprintable characters are escaped using "\\x%02X" format, but "\" was not escaped properly leading to irreversible ser/de using toStringBinary() -> toBytesBinary().
      Show
      This patch changes Bytes.toStringBinary() and Bytes.toBytesBinary() to escape the character "\". Unprintable characters are escaped using "\\x%02X" format, but "\" was not escaped properly leading to irreversible ser/de using toStringBinary() -> toBytesBinary().

    Description

      there is a bug in Bytes.toStringBinary(), which will return the same string for 1) byte[] a =

      {'\\', 'x', 'D', 'A'}

      2) "\xDA".

      It seems this bug has already been fixed in trunk with HBASE 6991. We should backport it to 94.

      Attachments

        1. HBASE-8085.patch
          5 kB
          Tianying Chang
        2. HBASE-8085-v2.patch
          5 kB
          Tianying Chang

        Issue Links

          Activity

            People

              tychang Tianying Chang
              tychang Tianying Chang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: