You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by anil gupta <an...@gmail.com> on 2015/01/21 00:43:46 UTC

[HBase Restful] How to get a composite RowKey:

Hi,

I want to fetch a row from hbase rest client. Composite Rowkey is:
<String><Integer>
This is how the rowkey looks on hbase shell: ABCDEF\x00\x00\x00\x00\x01
I tried to do this request: hostname:8080/TABLE/ABCDEF%2Fx00%2Fx00%2Fx00%2F
x00%2Fx01
Is it possible to get the this kind of row from Restful interface? If yes,
Can anyone tell me how to get this row via Restful?

Thanks & Regards,
Anil Gupta

Re: [HBase Restful] How to get a composite RowKey:

Posted by Nick Dimiduk <nd...@gmail.com>.
What is the rest service returning to you? It should be the base64 encoded
value. You'll need to decode this value to get a byte[] with which you can
operate. As for exactly how to parse it, that depends on how you created it
in the first place.

The section on REST in the community book [0] links off to some articles
with examples. It's also covered in HBase In Action (disclosure: of which,
I am an author).

-n

[0]: http://hbase.apache.org/book.html#_rest

On Tue, Jan 20, 2015 at 3:43 PM, anil gupta <an...@gmail.com> wrote:

> Hi,
>
> I want to fetch a row from hbase rest client. Composite Rowkey is:
> <String><Integer>
> This is how the rowkey looks on hbase shell: ABCDEF\x00\x00\x00\x00\x01
> I tried to do this request: hostname:8080/TABLE/ABCDEF%2Fx00%2Fx00%2Fx00%2F
> x00%2Fx01
> Is it possible to get the this kind of row from Restful interface? If yes,
> Can anyone tell me how to get this row via Restful?
>
> Thanks & Regards,
> Anil Gupta
>