Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 07-12-2022 03:51 AM - edited 07-12-2022 06:09 AM
Hi guys,
I need your assistance on querying hbase rest with special characters in the rowkey.
Hi, I have the following rowkey and data in Hbase:
ROW COLUMN+CELL
\xF2member-00002 column=cf:age, timestamp=2022-07-12T10:16:11.986, value=20
I am querying using the REST interface (version 0.0.3) as:
GET 'http://localhost:8080/member/%F2member-00002'
but always getting Not found.
What should be the correct url encoded rowkey?
Thanks!
Created 07-13-2022 10:55 AM
Hello,
Based on the above test, I guess you are hitting HBASE-21852 which is still unresolved in the upstream.
Created 07-13-2022 07:35 AM
Hello,
The encoded value for \x would be %5Cx. So can you try using it in the url. Is it connecting via Knox?
Also, do upload the curl command output.
Created 07-13-2022 09:48 AM
Hi @rki_ ,
Thanks for the reply. I have also used standard url encoding but still getting no results. By the way, what is interesting is when I have the following data:
ROW COLUMN+CELL
\xF2member-00002 column=cf:age, timestamp=2022-07-12T10:16:11.986, value=20
\x00member-00003 column=cf:age, timestamp=2022-07-12T10:16:11.986, value=20I can query \x00member-00003 via curl by replacing \x with %
curl -v -X GET 'http://localhost:8080/member/%00member-00003' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json'and get results.
{
"Row": [
{
"key": "AG1lbWJlci0wMDAwMw==",
"Cell": [
{
"column": "TTpwI2FnZQ==",
"timestamp": 1657730533731,
"$": "MjA="
}
]
}
]
}
but not this.
curl -v -X GET 'http://localhost:8080/member/%F2member-00002' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json'It returns Not Found.
Also, I am using an hbase standalone docker image (mckdev/hbase:2.4.12).
Created 07-13-2022 10:55 AM
Hello,
Based on the above test, I guess you are hitting HBASE-21852 which is still unresolved in the upstream.
Created 07-13-2022 07:56 PM