Managing High Availability
Also available as:
PDF

Start and test your HBase cluster

  1. Use the jps command to ensure that HBase is not running.
  2. Kill HMaster, HRegionServer, and HQuorumPeer processes, if they are running.
  3. Start the cluster by running the start-hbase.sh command on node-1.
    Your output is similar to this:
    $ bin/start-hbase.sh
    node-3.test.com: starting zookeeper, logging to /home/hbuser/hbase-0.98.3-hadoop2/bin/../logs/hbase-hbuser-zookeeper-node-3.test.com.out
    node-1.example.com: starting zookeeper, logging to /home/hbuser/hbase-0.98.3-hadoop2/bin/../logs/hbase-hbuser-zookeeper-node-1.test.com.out
    node-2.example.com: starting zookeeper, logging to /home/hbuser/hbase-0.98.3-hadoop2/bin/../logs/hbase-hbuser-zookeeper-node-2.test.com.out
    starting master, logging to /home/hbuser/hbase-0.98.3-hadoop2/bin/../logs/hbase-hbuser-master-node-1.test.com.out
    node-3.test.com: starting regionserver, logging to /home/hbuser/hbase-0.98.3-hadoop2/bin/../logs/hbase-hbuser-regionserver-node-3.test.com.out
    node-2.test.com: starting regionserver, logging to /home/hbuser/hbase-0.98.3-hadoop2/bin/../logs/hbase-hbuser-regionserver-node-2.test.com.out
    node-2.test.com: starting master, logging to /home/hbuser/hbase-0.98.3-hadoop2/bin/../logs/hbase-hbuser-master-node2.test.com.out
          
    ZooKeeper starts first, followed by the Master, then the RegionServers, and finally the backup Masters.
  4. Run the jps command on each node to verify that the correct processes are running on each server.
    Example1. node-1 jps Output
    $ jps
    20355 Jps
    20071 HQuorumPeer
    20137 HMaster
    Example 2. node-2 jps Output
    $ jps
    15930 HRegionServer
    16194 Jps
    15838 HQuorumPeer
    16010 HMaster
    Example 3. node-3 jps Output
    $ jps
    13901 Jps
    13639 HQuorumPeer
    13737 HRegionServer
    ZooKeeper Process Name

    You might see additional Java processes running on your servers as well, if they are used for any other purposes.

    The HQuorumPeer process is a ZooKeeper instance which is controlled and started by HBase. If you use ZooKeeper this way, it is limited to one instance per cluster node and is appropriate for testing only. If ZooKeeper is run outside of HBase, the process is called QuorumPeer. For more about ZooKeeper configuration, including using an external ZooKeeper instance with HBase, see the zookeeper project site.
  5. Browse to the Web UI and test your new connections.
    You should be able to connect to the UI for the Master http://node-1.test.com:16010/ or the standby master at http://node-2.test.com:16010/. If you can connect through localhost but not from another host, check your firewall rules. You can see the web UI for each of the RegionServers at port 16030 of their IP addresses, or by clicking their links in the web UI for the Master.
    Web UI Port Changes
    In HBase newer than 0.98.x, the HTTP ports used by the HBase Web UI changed from 60010 for the Master and 60030 for each RegionServer to 16010 for the Master and 16030 for the RegionServer.