Skip to content
arinto edited this page Dec 24, 2012 · 8 revisions

This guide explains how to build zkndb and produce the corresponding executable jar file.

Development environment

  1. Netbeans preferably version 7.2.1 or above. Download here.
  2. JDK 1.6 or above to compile the source code. Download here.
  3. JDK 1.7 or above to run Netbeans. Change Netbeans' config file (netbeans.conf) to use JDK 1.7 by modifying netbeans_jdkhome field. Example: netbeans_jdkhome="/usr/java/jdk1.7.0_09"

(Alternatively download the package with Netbeans+Java from the Java JDK webpage)

External dependencies

This project requires external jar files that are compressed into zkndb-libraries.tar.gz.

The compressed jar files can be downloaded [here] (https://dl.dropbox.com/u/19929044/zkndb-libraries.tar.gz)

Extract this compressed file into a path of your choice, but we recommend to put them in /usr/share/zkndb for Linux.

Build the code using Netbeans

  1. Download the code from github using git clone https://github.com/4knahs/zkndb.git
  2. Open the code using Netbeans.
  3. Check the dependencies, by opening Libraries in zkndb project tree. If errors are returned by the existing configuration, remove all the jar files and add all jar files from the extracted zkndb-libraries.tar.gz into the project.
  4. Build the project using Netbeans' Build Project (press F11).
  5. Generated jar file (zkndb.jar) can be found in: $zkndb_project_root/dist. All the required library files also copied into $zkndb_project_root/dist/lib
  6. Copy all the properties file from $zkndb_project_root/src/zkndb/storage into $zkndb_project_root/dist so that we can configure runtime parameter of ZK, HDFS and NDB storage implementation easily. They are three main properties files:
  • zkndb-clusterj.properties, to configure where NDB cluster resides. You must change com.mysql.clusterj.connectstring to the address of your NDB cluster and ensure that com.mysql.clusterj.database database exists.
  • zkndb-hdfsstorageimpl.properties, to configure where HDFS cluster resides. You must change hdfsstorageimpl.hdfsuri to the address of your HDFS cluster.
  • zkndb-zkstorageimpl.properties, to configure where ZK cluster resides. You must change zkstorageimpl.zkhostport to the address of your ZK cluster.
  1. If you need to bring the executables to other machine, you can compress the resulting executables and properties files using tar utility. Go to $zkndb_project_root/dist and type tar -cvzf executables.tar.gz *.

For more info about executing the benchmark, you can go to How to execute section.

To learn about zkndb architecture, you can go to Getting Started section.

Clone this wiki locally