Transactional Support for HBase
Java C++ Shell
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1120 commits behind yahoo:master.
Latest commit d57ea37 Apr 12, 2012 @fpj fpj Changes to fix the bug. -F


This project provides transactional support for HBase (or any other key-value store) using Snapshot Isolation. If you have any question, please contact us at


Omid is composed by a server (the Status Oracle) and several clients. The server contains all the information needed to manage transactions and replicates it to the clients which just contact the server when they want to start a transaction or commit it.

The server uses BookKeeper as a Writer Ahead Log where it dumps all its state. In case of crash it is possible to restart the server without losing any commit information.


Omid uses Maven for its build system. We are using a temporary repository for zookeeper and bookkeeper packages to ease the installation procedure

Then to compile omid:

$ tar jxvf omid-1.0-SNAPSHOT.tar.bz2
$ cd omid-1.0-SNAPSHOT
$ mvn install

Tests should run cleanly.


You need to run four components before running the transactional client. They are bookkeeper, zookeeper, omid tso and hbase. Bookkeeper is needed by the TSO. Zookeeper is needed by bookkeeper and hbase. The TSO is needed by hbase. Hence, the order of starting should be: 1. Zookeeper 2. Bookkeeper 3. TSO 4. Hbase

Zookeeper & Bookkeeper

For simplicity we've included a utility script which starts zookeeper and bookkeeper. Run:

$ bin/ bktest

Omid doesn't use anything special in zookeeper or bookkeeper, so you can use any install for these. However, if you are running this anywhere but localhost, you need to update the setting for hbase and TSO. See the hbase docs for changing the zookeeper quorum. For TSO, you need to modify bin/


To start the TSO, run:

$ bin/ tso


To benchmark the TSO alone, run:

$ bin/ tsobench


We've included a utility script to start a HBase cluster on your local machine. Run:

$ bin/ tran-hbase

For running in a cluster


The public api is in


For an example of usage, look in



Logging can be adjusted in src/main/resource/