Skip to content
Newer
Older
100644 97 lines (65 sloc) 2.64 KB
2e435f5 @dgomezferro Omid project
dgomezferro authored Nov 2, 2011
1 Omid
2 =====
3
4 This project provides transactional support for HBase (or any other key-value store) using Snapshot Isolation.
5
6 Architecture
7 ------------
8
9 Omid is composed by a server (the Status Oracle) and several clients. The server contains all the information
10 needed to manage transactions and replicates it to the clients which just contact the server when they want
11 to start a transaction or commit it.
12
13 The server uses BookKeeper as a Writer Ahead Log where it dumps all its state. In case of crash it is possible
14 to restart the server without losing any commit information.
15
16 Compilation
17 -----------
18
19 Omid uses Maven for its build system. The versions of zookeeper and bookkeeper are missing from mvn, so you have to
20 manually install these dependencies.
21
22 To install zookeeper:
23
24 $ mvn install:install-file -DgroupId=org.apache.zookeeper -DartifactId=zookeeper -Dversion=3.4.0 -Dpackaging=jar -Dfile=zookeeper-3.4.0.jar
25
26 To install bookkeeper:
27
28 $ mvn install:install-file -DgroupId=org.apache.zookeeper -DartifactId=bookkeeper -Dversion=3.4.0 -Dpackaging=jar -Dfile=bookkeeper-3.4.0.jar
29
30 Then to compile omid:
31
32 $ tar jxvf omid-1.0-SNAPSHOT.tar.bz2
33 $ cd omid-1.0-SNAPSHOT
34 $ mvn install
35
36 Tests should run cleanly.
37
38 Running
39 -------
40
41 You need to run four components before running the transactional
42 client. They are bookkeeper, zookeeper, omid tso and
43 hbase. Bookkeeper is needed by the TSO. Zookeeper is needed by
44 bookkeeper and hbase. The TSO is needed by hbase. Hence, the order of
45 starting should be:
46 1. Zookeeper
47 2. Bookkeeper
48 3. TSO
49 4. Hbase
50
51 ### Zookeeper & Bookkeeper
52 For simplicity we've included a utility script which starts zookeeper
53 and bookkeeper. Run:
54
55 $ bin/omid.sh bktest
56
57 Omid doesn't use anything special in zookeeper or bookkeeper, so you
58 can use any install for these. However, if you are running this
59 anywhere but localhost, you need to update the setting for hbase and
60 TSO. See the hbase docs for changing the zookeeper quorum. For TSO,
61 you need to modify bin/omid.sh.
62
63 ### TSO
64 To start the TSO, run:
65
66 $ bin/omid.sh tso
67
68 ### Benchmark
69 To benchmark the TSO alone, run:
70
71 $ bin/omid.sh tsobench
72
73 ### HBase
74 We've included a utility script to start a HBase cluster on your local
75 machine. Run:
76
77 $ bin/omid.sh tran-hbase
78
79 For running in a cluster
80
81 API
82 ---
83
84 The public api is in
85
86 src/main/java/com/yahoo/omid/client/TransactionalTable.java
87 src/main/java/com/yahoo/omid/client/TransactionState.java
88 src/main/java/com/yahoo/omid/client/TransactionManager.java
89
90 For an example of usage, look in
91
92 src/test/java/com/yahoo/omid/TestBasicTransaction.java
93
94 Logging
95 -------
96 Logging can be adjusted in src/main/resource/log4j.properties.
Something went wrong with that request. Please try again.