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'…
Tags: , Read More »

HOWTO: Optimal Way to Shut Down an HDP Slave Node

ISSUE

What is the optimal way to shut down a HDP slave node

SOLUTION

HDP slave nodes are usually configured to run the datanode and tasktracker processes. If HBase is installed, then the slave nodes run the HBase RegionServer process as well.

To shut down the slave node, it is important to shut down the slave processes first. Each process should be shut down by the respective user account. These are the commands to run:

Stop Hbase RegionServer:

su hbase - -c "hbase-daemon.sh --config /etc/hbase/ stop regionserver"

Stop tasktracker:

su mapred - -c "hadoop-daemon.sh --config /etc/hadoop/ stop tasktracker"

Stop datanode:

su hdfs - -c "hadoop-daemon.sh --config /etc/hadoop/ stop datanode"…
Tags: , , Read More »