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

REST client (RemoteHTable) doesn't support binary row keys

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.94.0, 0.95.2, 0.98.4, 2.0.0
    • Fix Version/s: 1.4.0, 2.0.0
    • Component/s: REST
    • Labels:
      None
    • Release Note:
      RemoteHTable now supports binary row keys with any character or byte by properly encoding request URLs. This is a both a behavioral change from earlier versions and an important fix for protocol correctness.

      Description

      The REST server doesn't seem to support using binary (MD5 for example) row keys. I believe the root cause of this is the use of Bytes.toBytes() in the RowSpec.parseRowKeys() method. Based on the use of Bytes.toStringBinary() within RemoteHTable.buildRowSpec(), I believe the converse function Bytes.toBytesBinary() should be used for row key parsing in RowSpec.parseRowKeys().

      I also noticed that the RemoteHTable.buildRowSpec() method isn't URL encoding the row key, which is a mismatch to the logic in RowSpec.parseRowKeys() which performs URL decoding for both the start and stop row keys.

        Attachments

          Activity

            People

            • Assignee:
              kdwinkler Keith David Winkler
              Reporter:
              cmuchinsky@initiatesystems.com Craig Muchinsky
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: