BookKeeper Table Service is a contrib module added to BookKeeper, providing a table (aka key/value) service as part of the stream storage for bookkeeper.
$ mvn clean install -DskipTests
$ bin/streamstorage standalone
CLI is available at bin/streamstorage-cli
Stream is the management unit. A Table is a materialized view of a Stream.
bin/streamstorage-cli -s 127.0.0.1:4181 stream create --stream test_dist_counter
bin/streamstorage-cli -s 127.0.0.1:4181 table get -t test_dist_counter -k "counter-1" --watch
bin/streamstorage-cli -s 127.0.0.1:4181 table incr -t test_dist_counter -k "counter-1" -a 100
Use the table service as the normal k/v store for storing metadata
bin/streamstorage-cli -s 127.0.0.1:4181 stream create --stream test_kv_store
bin/streamstorage-cli -s 127.0.0.1:4181 table get -t test_kv_store -k "test-key" --watch
bin/streamstorage-cli -s 127.0.0.1:4181 table put -t test_kv_store -k "test-key" -v "test-value-`date`"
bin/streamstorage-cli -s 127.0.0.1:4181 table get -t test_kv_store -k "test-counter-key" --watch
bin/streamstorage-cli -s 127.0.0.1:4181 table incr -t test_kv_store -k "test-counter-key" -a 200
partitioned table. the table is modeled as <pKey, lKey> -> value, kv pairs are partitioned based on pKey. range operations over a single pKey is supported.<pKey, lKey><pKey><pKey><pKey, lKey><key> -> value. kv pairs are also partitioned, based on key. range operations are not supported. single key txn (aka cas operation) is supported.