Support Questions

Find answers, ask questions, and share your expertise

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