Provides Hbase, the Hadoop simple database.

Requirements

Getting Started

What follows presumes you are installing hbase for the first time. If upgrading your hbase instance, see Upgrading.

Start by defining the following directory variables for your convenience:

If you are running a standalone operation, proceed to Running and Confirming Your Installation. If you are running a distributed operation, continue below.

Distributed Operation

Make sure you have followed Hadoop's instructions for running a distributed operation. Configuring Hbase for a distributed operation requires modification of the following two files: ${HBASE_HOME}/conf/hbase-site.xml and ${HBASE_HOME}/conf/regionservers.

hbase-site.xml allows the user to override the properties defined in ${HBASE_HOME}/conf/hbase-default.xml (hbase-default.xml itself should never be modified). At a minimum the hbase.master property should be redefined in hbase-site.xml to define the host:port pair on which to run the HMaster (read about the Hbase master, regionservers, etc):

<configuration>

  <property>
    <name>hbase.master</name>
    <value>[YOUR_HOST]:[PORT]</value>
    <description>The host and port that the Hbase master runs at.
    </description>
  </property>

</configuration>

The regionserver file lists all the hosts running HRegionServers, one host per line (This file is synonymous to the slaves file at ${HADOOP_HOME}/conf/slaves).

Additional Notes on Distributed Operation

Running and Confirming Your Installation

If you are running in standalone, non-distributed mode, hbase by default uses the local filesystem.

If you are running a distributed cluster you will need to start the Hadoop DFS daemons before starting Hbase and stop the daemons after Hbase has shut down. Start and stop the Hadoop DFS daemons as per the Hadoop instructions. Hbase does not normally use the mapreduce daemons. These do not need to be started.

Start Hbase with the following command:

${HBASE_HOME}/bin/start-hbase.sh

Once Hbase has started, enter ${HBASE_HOME}/bin/hbase shell to obtain a shell against Hbase from which you can execute Hbase commands. In the Hbase shell, type help; to see a list of supported commands. Note that all commands in the Hbase shell must end with ;. Test your installation by creating, viewing, and dropping a table, as per the help instructions. Be patient with the create and drop operations as they may each take 10 seconds or more. To stop hbase, exit the Hbase shell and enter:

${HBASE_HOME}/bin/stop-hbase.sh

If you are running a distributed operation, be sure to wait until Hbase has shut down completely before stopping the Hadoop daemons.

The default location for logs is ${HADOOP_HOME}/logs.

Hbase also puts up a UI listing vital attributes. By default its deployed on the master host at port 60010.

Upgrading

After installing the new hbase, before starting your cluster, run the ${HBASE_DIR}/bin/hbase migrate migration script. It will make any adjustments to the filesystem data under hbase.rootdir necessary to run the hbase version.

Related Documentation