Chapter 4. The Apache HBase Shell

Table of Contents

4.1. Scripting
4.2. Shell Tricks
4.2.1. irbrc
4.2.2. LOG data to timestamp
4.2.3. Debug
4.2.4. Commands

The Apache HBase (TM) Shell is (J)Ruby's IRB with some HBase particular commands added. Anything you can do in IRB, you should be able to do in the HBase Shell.

To run the HBase shell, do as follows:

$ ./bin/hbase shell

Type help and then <RETURN> to see a listing of shell commands and options. Browse at least the paragraphs at the end of the help emission for the gist of how variables and command arguments are entered into the HBase shell; in particular note how table names, rows, and columns, etc., must be quoted.

See Section 1.2.3, “Shell Exercises” for example basic shell operation.

4.1. Scripting

For examples scripting Apache HBase, look in the HBase bin directory. Look at the files that end in *.rb. To run one of these files, do as follows:

$ ./bin/hbase org.jruby.Main PATH_TO_SCRIPT

comments powered by Disqus