Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

HBASE and REST API

avatar
Super Collaborator

can I read/write/manipulate HBASE data via REST API in Hortonworks ? if yes can you guide me some documentation and examples ?

I also have Phoenix , is it better to read Hbase data via Phoenix views? again I want to read it via REST API.

1 ACCEPTED SOLUTION

avatar
Super Guru

@Sami Ahmad,

Yes. You can use the hbase REST API to manipulate data in HDP. By default the hbase rest server is not started. You need to start it first

To start rest server in foreground

# su hbase
# hbase rest start -p {port to start the server}

To start in background

# su hbase
# /usr/hdp/current/hbase-master/bin/hbase-daemon.sh start rest -p {port to start the server}

.

Ref: http://hbase.apache.org/book.html#_rest

http://blog.cloudera.com/blog/2013/03/how-to-use-the-apache-hbase-rest-interface-part-1/

.

You can also use the phoenix query server to do the manipulation using http using sqlline.py. But the interface it not REST. Phoenix is built on Apache Calcite.

http://phoenix.apache.org/server.html

.

Please "Accept" the answer if this helps.

-Aditya

View solution in original post

1 REPLY 1

avatar
Super Guru

@Sami Ahmad,

Yes. You can use the hbase REST API to manipulate data in HDP. By default the hbase rest server is not started. You need to start it first

To start rest server in foreground

# su hbase
# hbase rest start -p {port to start the server}

To start in background

# su hbase
# /usr/hdp/current/hbase-master/bin/hbase-daemon.sh start rest -p {port to start the server}

.

Ref: http://hbase.apache.org/book.html#_rest

http://blog.cloudera.com/blog/2013/03/how-to-use-the-apache-hbase-rest-interface-part-1/

.

You can also use the phoenix query server to do the manipulation using http using sqlline.py. But the interface it not REST. Phoenix is built on Apache Calcite.

http://phoenix.apache.org/server.html

.

Please "Accept" the answer if this helps.

-Aditya