5

I have an HBase table that (in part) utilizes hexadecimal bytes to construct its rowkeys. I'm able to query from the Hbase Shell just fine as follows

get 'my_table', "XYZ:\x7F\xFF\xFF\xFF\xFF\xFF\xFF\x82"

However, I want to use the stargate API (or one of the many ruby gems that serve as a wrapper) to query hbase remotely.

If I run the exact same query above, I get a 404 not found. Note that the : and \ characters are URL-encoded.

curl "http://myHbaseServer.domain:8080/my_table/XYZ%3A%5Cx7F%5CxFF%5CxFF%5CxFF%5CxFF%5CxFF%5CxFF%5Cx82/content:raw"
=> 404 Not Found

I know this format is correct as it returns a table list when I simply call the / endpoint. It's also not throwing a connectivity error. Any thoughts on whether these characters are being properly escaped?

Thanks!

user2490003
  • 10,706
  • 17
  • 79
  • 155

1 Answers1

1

\x do not need to be encoded, this is just a convention used by HBase to represent a non-ASCII byte value. \x7F should be converted to %7F in URL

kostya
  • 9,221
  • 1
  • 29
  • 36