Reply
New Contributor
Posts: 3
Registered: ‎05-07-2014

Connecting to HBase using Rest Services

I followed the tutorial and tried communicating to HBase using JSON and Rest Services.

I am using the cloudera distribution CDH4.6 The HBase version in this is hbase-0.94.15+86

I called the following link(60000 is the port where HBase is running on the CDH4 VMware Machine. location is the name of the table)

 

http://192.168.26.128:60000/location (using get)

 

This is mentioned in the following link, that this should get all the table data in JSON format

 

http://wiki.apache.org/hadoop/Hbase/JSONRest

 

I got the following error:

 

org.apache.hadoop.ipc.RPC$VersionMismatch>Server IPC version 3 cannot communicate with client version 47

 

I am not able to understand where the mismatch is happening? Am I doing something( or might be everything) wrong? Please point me in the correct direction Also, is the REST Service, already installed on the CDH or do we have to install it? An elaborate answer on the basics or any link to a document explaining the very basic step by step would be very much helpful. I have been trying to google and found a lot of stuffs, but nothing was able to make things work for me. Thanks in advance

Cloudera Employee
Posts: 35
Registered: ‎09-04-2013

Re: Connecting to HBase using Rest Services

Can you scan your table from HBase shell? What's the port your REST server listen to? By default it is 8080.

New Contributor
Posts: 3
Registered: ‎05-07-2014

Re: Connecting to HBase using Rest Services

Hi jxiang,

Thanks a lot for your reply. Could you please let me know if CDH4.6 already has a REST Server installed or do I need to install it?
I can scan my table using HBase shell.
Cloudera Employee
Posts: 35
Registered: ‎09-04-2013

Re: Connecting to HBase using Rest Services

How did you install CDH4.6? Using CM? From CM, it should be
straightforward to start it.
>From command line, you can start it with "bin/hbase rest start".

Posts: 1,697
Kudos: 341
Solutions: 264
Registered: ‎07-31-2013

Re: Connecting to HBase using Rest Services

The port 60000 is the HBase Master's RPC port, not the HBase REST HTTP service port, which is served over a different address (20550 or 8080) as referenced at http://www.cloudera.com/content/cloudera-content/cloudera-docs/CM4Ent/latest/Cloudera-Manager-Instal... or by your CM's configured HBase -> Configuration -> hbase.rest.port value.
Highlighted
Posts: 1,697
Kudos: 341
Solutions: 264
Registered: ‎07-31-2013

Re: Connecting to HBase using Rest Services

Missed previous responses sorry. To install a REST server if one is not already present, go to CM -> HBase -> Instances ->Add -> Add a host for the REST service shown there. Once done, start it up.
Announcements