Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-1005

Special characters in HBase rows while called through Knox

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.0, 0.9.1, 0.10.0, 0.11.0, 0.12.0, 0.13.0
    • 0.14.0
    • Server
    • CentOS Linux release 7.3.1611, HBase 1.1.2

    Description

      Hello,

      Any HBase row containing special characters in the name (for example #) throws 404 Not Found error if accessed via Knox 0.9.0 and above. Accessing the same row directly via HBase Rest works without any issues.

      I haven't tried with other special characters though, and I think this is caused by KNOX-709.

      How to reproduce:

      • Create an entry in HBase containing #:
      hbase(main):002:0> put 'hbaseexample', '5#', 'columns:_c1', 'test'
      
      hbase(main):002:0> scan 'hbaseexample'
      ROW        COLUMN+CELL 
       5#            column=columns:_c1, timestamp=1503660672170, value=test
      1 row(s) in 0.6700 seconds
      • Try to access it via Knox 0.9.0 and above:
      # curl -iku user:pass -X GET 'https://srv-knx01:8443/gateway/default/hbase/hbaseexample/5%23'
      HTTP/1.1 404 Not Found
      Date: Fri, 25 Aug 2017 14:48:08 GMT
      Set-Cookie: JSESSIONID=92exxxxxxxxxx16uy;Path=/gateway/default;Secure;HttpOnly
      Expires: Thu, 01 Jan 1970 00:00:00 GMT
      Set-Cookie: rememberMe=deleteMe; Path=/gateway/default; Max-Age=0; Expires=Thu, 24-Aug-2017 14:48:08 GMT
      Content-Type: text/plain
      Content-Length: 11
      Server: Jetty(9.2.15.v20160210)
      
      Not found
      
      • No issues with Knox 0.8.0 and below:
      # curl -iku user:pass -X GET 'https://srv-knx01:8443/gateway/default/hbase/hbaseexample/5%23'
      HTTP/1.1 200 OK
      Set-Cookie: JSESSIONID=1kxxxxxxxxxxnl5q;Path=/gateway/default;Secure;HttpOnly
      Expires: Thu, 01 Jan 1970 00:00:00 GMT
      Content-Type: text/xml
      Transfer-Encoding: chunked
      Server: Jetty(8.1.14.v20131031)
      
      <?xml version="1.0" standalone="yes"?><CellSet><Row key="NSM="><Cell column="Y29sdW1uczpfYzE=" timestamp="1503660672170">dGVzdA==</Cell></Row></CellSet>
      

      Thank you in advance.

      Attachments

        1. KNOX-1029.001.patch
          2 kB
          Sandeep More

        Issue Links

          Activity

            People

              smore Sandeep More
              nov1c3 Roman
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: