HBaseREST icon indicating copy to clipboard operation
HBaseREST copied to clipboard

How can you scan with hbase rest interface

Open debarshri opened this issue 10 years ago • 1 comments

I was wondering if there is anyway I can scan, filter etc via rest interface of hbase

debarshri avatar Jun 16 '15 14:06 debarshri

Hi debarshri,

To use scanner you essentially need to follow 3 steps: 1.) Create a scanner using PUT request This will return you a scanner location. You can add your filters here using json inside xml <filter> tag. <Scanner> <filter> write your filter here in json </filter> <Scanner> To check filter syntax you can stringify the filter you want in java and have a look at the json syntax. Every value you use should be Base64 encoded. 2.) Use GET request to read from the scanner location. It can be used to get data in json,xml and protbufs. 3.) Use DELETE request to delete the scanner.

Here is the documentation link for using above methods: http://wiki.apache.org/hadoop/Hbase/Stargate

Rohnak avatar Jul 07 '15 20:07 Rohnak