HBase is an open source, non-relational, distributed database modeled after Google’s BigTable and written in Java and runs on top of HDF (Hadoop Distributed Filesystem), providing BigTable-like capabilities for Hadoop.
In synopsis, HBase tables are like those in an RDBMS, only cells are versioned, rows are sorted, and columns can be added on the fly by the client as long as the column family they belong to preexists.
Download a stable release from an Apache Download Mirror and unpack it on your local filesystem.For example: % tar xzf hbase-x.y.z.tar.gz
As with Hadoop, you first need to tell HBase where Java is located on your system. If you have the JAVA_HOME environment variable set to point to a suitable Java installation, then that will be used, and you don’t have to configure anything further.
Otherwise, you can set the Java installation that HBase uses by editing HBase’s conf/hbase-env.sh and specifying the JAVA_HOME variable to point to version 1.6.0 of Java.
HBaseFor convenience, add the HBase binary directory to your command-line path.For example:
% export HBASE_HOME=/home/hbase/hbase-x.y.z
% export PATH=$PATH:$HBASE_HOME/bin
To get the list of HBase options, type:
Usage: hbase <command> where <command> is one of:
shell run the HBase shell
master run an HBase HMaster node
regionserver run an HBase HRegionServer node
zookeeper run a Zookeeper server
rest run an HBase REST server
thrift run an HBase Thrift server
avro run an HBase Avro server
migrate upgrade an hbase.rootdir
hbck run the hbase ‘fsck’ tool
CLASSNAME run the class named CLASSNAME
Most commands print help when invoked w/o parameters.
To start a temporary instance of HBase that uses the /tmp directory on the local file-system for persistence, type:
This will launch a standalone HBase instance that persists to the local filesystem.
To administer your HBase instance, launch the HBase shell by typing:
% hbase shell
HBase Shell; enter ‘help<RETURN>’ for list of supported commands.
Type “exit<RETURN>” to leave the HBase Shell
Version: 0.89.0-SNAPSHOT, ra4ea1a9a7b074a2e5b7b24f761302d4ea28ed1b2, Sun Jul 18
15:01:50 PDT 2010 hbase(main):001:0>