HOWTO Test Hbase Setup

ISSUE

How do I test that Hbase is working properly? OR

What is a simple set of Hbase Commands?

SOLUTION

If HBase processes are not running, start them with the following commands:

To start the HBase master (‘sleep 25’ is included as the master takes some time to get up and running):

su hbase - -c "/usr/bin/hbase-daemon.sh --config /etc/hbase start master; sleep 25"

To start the HBase regioanserver:

su hbase - -c "/usr/bin/hbase-daemon.sh --config /etc/hbase start regionserver"

This command will describe a simple status of the HBase cluster nodes:

status 'simple'

This command will create a table with one column family:

create 'table2', 'cf1'

This command will add a row to the table:

put 'table2', 'row1', 'column1', 'value'

This command will display all rows in the table:

scan 'table2'

Try these Tutorials

HDP 2.1 Webinar Series
Join us for a series of talks on some of the new enterprise functionality available in HDP 2.1 including data governance, security, operations and data access :
Contact Us
Hortonworks provides enterprise-grade support, services and training. Discuss how to leverage Hadoop in your business with our sales team.
Explore Technology Partners
Hortonworks nurtures an extensive ecosystem of technology partners, from enterprise platform vendors to specialized solutions and systems integrators.