Created 04-11-2017 04:58 AM
Hi,
I'm trying out Hbase Stargate as a REST server that's bundled with my HBase installation. It's simple to get up and running, but I'm wondering how to view actual row data? We are using Kerberos and Ranger for authentication and authorization. When I perform a GET request in my REST client, I am returned with scrambled values or coded values:
curl --negotiate -vi -u : -X GET -H "Accept: text/xml" http://localhost:8085/tablename/value
Output:
<code><?xml version="1.0" encoding="UTF-8" standalone="yes"?> <CellSet> <Row key="cm93MQ=="> <Cell column="Y2Y6QXJ0aWNsZUlE" timestamp="1357592601561">MQ==</Cell> <Cell column="Y2Y6Q2FwRGF0ZQ==" timestamp="1357592790624">dG9kYXk=</Cell> <Cell column="Y2Y6Q292ZXJhZ2U=" timestamp="1357592715068">U2FtcGxlIENvdmVyYWdl</Cell> <Cell column="Y2Y6RW5jb2Rpbmc=" timestamp="1357592773388">VVRGLTg=</Cell> <Cell column="Y2Y6TENvZGU=" timestamp="1357592744929">ZW4=</Cell> <Cell column="Y2Y6TGFuZw==" timestamp="1357592760758">RW5nbGlzaA==</Cell> <Cell column="Y2Y6TmF0aXZlTmFtZQ==" timestamp="1357592681884">U2FtcGxlIE5hdGl2ZSBOYW1l</Cell> <Cell column="Y2Y6UHViRGF0ZQ==" timestamp="1357592786561">dG9kYXk=</Cell> <Cell column="Y2Y6U291cmNlSUQ=" timestamp="1357592732763">MQ==</Cell> <Cell column="Y2Y6U291cmNlSUQ=" timestamp="1357592663427">U2FtcGxlIFNvdXJjZSBJRA==</Cell> <Cell column="Y2Y6U291cmNlVHlwZQ==" timestamp="1357592701595">U2FtcGxlIFNvdXJjZSBUeXBl</Cell> <Cell column="Y2Y6VGV4dA==" timestamp="1357592802878">U2FtcGxlIFRleHQ=</Cell> <Cell column="Y2Y6VGl0bGU=" timestamp="1357592629292">U2FtcGxlIFRpdGxl</Cell> <Cell column="Y2Y6VHJUaXRsZQ==" timestamp="1357592640605">U2FtcGxlIFRyVGl0bGU=</Cell> <Cell column="Y2Y6VXJs" timestamp="1357592616187">aHR0cDovL3d3dy5nb29nbGUuY29t</Cell> </Row> </CellSet>
I did reference the WIKI which also shows examples with scrambled results: http://wiki.apache.org/hadoop/Hbase/Stargate#A5, but I cannot find any information on how to decode it.
Any help is higly appricated and Thanks in advance...!
Created 04-11-2017 04:58 AM
The data is base64 encoded. This is because the data in HBase might otherwise make invalid XML.
Base64 decode the rowkey, column and cell data in your client application.
Created 04-11-2017 04:58 AM
The data is base64 encoded. This is because the data in HBase might otherwise make invalid XML.
Base64 decode the rowkey, column and cell data in your client application.
Created 04-11-2017 04:58 AM
Can you please suggest the best way to suppress it. Here the scenario, I need to data in text xml format when I run the curl command. If I need to apply any parameter accross the cluster to accomplish this, please do let me know.
Created 06-02-2017 08:10 PM
Thanks @Josh Elser
The encoding is done intentionally and hence there is no way to disable/suppress it from REST API Calls, if you wanna do decode it, we need to write Java code accordingly. here is the link: https://hbase.apache.org/book.html#_running_the_shell_in_non_interactive_mode