Skip to content

Getting Started

m1ch1 edited this page Feb 27, 2012 · 16 revisions

Install Dependencies

MapKeeper depends on:

Java

Download java from http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html.

Libevent

wget http://monkey.org/~provos/libevent-2.0.12-stable.tar.gz
tar xfvz libevent-2.0.12-stable.tar.gz
cd libevent-2.0.12-stable
./configure --prefix=/usr/local
make && sudo make install

Boost

wget http://superb-sea2.dl.sourceforge.net/project/boost/boost/1.48.0/boost_1_48_0.tar.gz
tar xfvz boost_1_48_0.tar.gz
cd boost_1_48_0
./bootstrap.sh --prefix=/usr/local
sudo ./b2 install 

Thrift

wget http://archive.apache.org/dist/thrift/0.8.0/thrift-0.8.0.tar.gz
tar xfvz thrift-0.8.0.tar.gz
cd thrift-0.8.0
./configure --prefix=/usr/local

Keep an eye on the output from ./configure command. At the very end, you should see something like this:

Building C++ Library ......... : yes
Building TNonblockingServer .. : yes

Make sure that:

  • Building C++ Library says yes.
  • Building TNonblockingServer says yes.

If all is well, compile and install Thrift by running:

make && sudo make install

Clone MapKeeper Repository

To get a copy of MapKeeper repository, run this command:

git clone git://github.com/m1ch1/mapkeeper.git

This will create your local MapKeeper repository under a directory called mapkeeper. Save the location of the directory in an environment variable:

export MKROOT=`pwd`/mapkeeper

Generate Thrift MapKeeper Binding

Go to mapkeeper/thrift directory and run make to generate and compile Thrift MapKeeper binding:

cd $MKROOT/thrift
make

Once the command succeeds, you should see libmapkeeper.so under gen-cpp directory.

Run MapKeeper Server!

MapKeeper supports various storage engines.

  • $MKROOT/bdb
  • $MKROOT/bdbj
  • $MKROOT/handlersocket
  • $MKROOT/leveldb
  • $MKROOT/mysql

Benchmark MapKeeper Server Using YCSB

Now that you are running MapKeeper server, you can benchmark it using YCSB. Clone the YCSB repository and compile it:

cd $MKROOT/ycsb
git clone git://github.com/brianfrankcooper/YCSB.git
cd YCSB
mvn clean package

cd $MKROOT/ycsb
./ycsb_load

You should see something like this:

YCSB Client 0.1
Command line: -load -db com.yahoo.ycsb.db.MapKeeperClient -P workloads/workloada -p measurementtype=timeseries -p timeseries.granularity=2000 -s
Loading workload...
Starting test.
 0 sec: 0 operations;
10 sec: 17697 operations; 1766.34 current ops/sec; [INSERT AverageLatency(us)=55429.15]
20 sec: 37377 operations; 1964.66 current ops/sec; [INSERT AverageLatency(us)=50891.38]
...

For more detailed information about how to use YCSB, check out their wiki page.

Clone this wiki locally