Book Image

Learning HBase

By : Shashwat Shriparv
Book Image

Learning HBase

By: Shashwat Shriparv

Overview of this book

Table of Contents (18 chapters)
Learning HBase
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

RESTful services and Thrift services interface


These are the inbuilt interfaces provided by HBase so that clients can communicate using RESTful and Thrift calls.

REST service interfaces

Now, let's discuss the RESTful service and Thrift that HBase provides in order to contact HBase besides Java coding. Stargate is the server that provides RESTful service interface through Java package, org.apache.hadoop.hbase.rest. It internally runs an embedded Jetty servlet container to handle the request.

We can start it as follows:

hbase rest start -p <port to use>

The preceding command starts REStful services in the foreground. Alternatively, you can start it and send it to the background:

bin/hbase-daemon.sh start rest -p <port to use>

REStful services can be stopped with the following command:

bin/hbase-daemon.sh stop rest

HBase can handle all REST requests through curl or any computer languages that support web service such as PHP. The following is the curl request example:

curl -H "Accept...