Assuming you’re running on Ubuntu. We start with installing
Oracle Java 6
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install
oracle-java6-installer
Note that although later Java
versions are also available, extra effort might be required to compile/run
Cassandra and YCSB if not using Java 6.
Make sure to set your $JAVA_HOME.
This can be done by
$ which java
In my case, the path is
/usr/bin/java, so I did
$ export JAVA_HOME=/usr
Next, install Apache Ant
$ sudo apt-get install ant
Ant (another neat tool), is a
tool for automating build, similar to Make (Ant:Java=Make:C/C++)
The next step is to download and
install YCSB. The package can be downloaded from here:
Although you can also clone
YCSB using git, the one on github doesn’t seem to have the appropriate
build.xml (build.xml is required for Ant). To make things easy, I use the
tarball.
Follow the steps from here to
build YCSB:
While building, keep in mind that
if you compile and run a program under different JDKs, an error will show up saying “Unsupported
major.minor version”. So just remember to use a Java version consistently.
You’ll also need to download and
install Cassandra. It can be found here:
Apache Cassandra is basically a
database management system. YCSB uses Cassandra to populate and operate on data
systems.
Similarly, although there are also later
versions of Cassandra, they are not always compatible with the Java/Ant/YCSB
version you’re using. For instance, there’ll be a stack size problem when
starting Cassandra if the Cassandra version and the Java version are not
compatible. So again, to make things easy, I use the tarball instead of installing it via Ubuntu deb.
To install and run Cassandra,
follow the steps in README inside the Cassandra directory. Alternatively, there
are some instructions here:
Now you should be ready to
generate a dataset. To do so
$ cd <path to cassandra>
$ ./bin/cassandra –f # this will
run Cassandra
Open another terminal
$ cd <path to cassandra>
$ ./bin/cassandra-cli -host localhost #
this will invoke the cli utility, which is connected your local-running
Cassandra
Then, populate the database
$ cd <path to ycsb>
$ ./run_load.command # modify this shell script and
settings_load.dat accordingly
Finally, run the benchmark
$ ./run.command # modify this shell script and
settings.dat accordingly
Please visit the CloudSuite and YCSB website for detailed
information
And also