You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Ameya Kantikar <am...@groupon.com> on 2013/04/11 00:43:43 UTC

Hbase Stargate Returns Scrambled Values

When I run some simple query on stargate it returns scarmbled values.

eg.:

curl -H "Accept: application/json" http://localhost:9001/t2/*/cf1


{"Row":[{"key":"Mg==","Cell":[{"timestamp":1363121013571,"column":"Y2YxOnRlc3Q=","$":"dmFsdWUy"}]},{"key":"Mw==","Cell":[{"timestamp":1363121724110,"column":"Y2YxOnRlc3Q=","$":"dmFsdWUy"}]},{"key":"NA==","Cell":[{"timestamp":1363216886908,"column":"Y2YxOnRlc3Q=","$":"dmFsdWU0"}]}]}

I understand that I can decode these values using base64 -d. But is there a
way to show these value in "non scrambled" format from get go? I see even
example here have scrambled values:
http://wiki.apache.org/hadoop/Hbase/Stargate


I was planing to use the HTTP interface for quickly looking into Hbase.
(Yes I can always use hbase shell, but was checking if there is a simple
way to do that via HTTP)

Any ideas?

Ameya

Re: Hbase Stargate Returns Scrambled Values

Posted by Andrew Purtell <ap...@apache.org>.
Ask for binary results, i.e. use an Accept header of "Accept:
application/octet-stream". This has limitations though, only one result can
be returned, so that wildcard query you provide as an example won't work.
You'll have to fully specify the path to a cell.

Otherwise, for JSON and XML representation types, since HBase keys and
values are byte[] and can (and often do) contain nulls and other such
unsafe chars, it doesn't make sense to provide them unencoded.


On Wed, Apr 10, 2013 at 3:43 PM, Ameya Kantikar <am...@groupon.com> wrote:

> When I run some simple query on stargate it returns scarmbled values.
>
> eg.:
>
> curl -H "Accept: application/json" http://localhost:9001/t2/*/cf1
>
>
>
> {"Row":[{"key":"Mg==","Cell":[{"timestamp":1363121013571,"column":"Y2YxOnRlc3Q=","$":"dmFsdWUy"}]},{"key":"Mw==","Cell":[{"timestamp":1363121724110,"column":"Y2YxOnRlc3Q=","$":"dmFsdWUy"}]},{"key":"NA==","Cell":[{"timestamp":1363216886908,"column":"Y2YxOnRlc3Q=","$":"dmFsdWU0"}]}]}
>
> I understand that I can decode these values using base64 -d. But is there a
> way to show these value in "non scrambled" format from get go? I see even
> example here have scrambled values:
> http://wiki.apache.org/hadoop/Hbase/Stargate
>
>
> I was planing to use the HTTP interface for quickly looking into Hbase.
> (Yes I can always use hbase shell, but was checking if there is a simple
> way to do that via HTTP)
>
> Any ideas?
>
> Ameya
>



-- 
Best regards,

   - Andy

Problems worthy of attack prove their worth by hitting back. - Piet Hein
(via Tom White)