From 302b7622c5d03589be5f63105ee49dc8b5e8ab4b Mon Sep 17 00:00:00 2001 From: Adnan Ahmad <adnanahmad4873@gmail.com> Date: Fri, 21 Aug 2020 12:45:37 -0500 Subject: [PATCH] added readme for zookeeper binding --- zookeeper/README.md | 61 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 58 insertions(+), 3 deletions(-) diff --git a/zookeeper/README.md b/zookeeper/README.md index 099e2806..247c8b20 100644 --- a/zookeeper/README.md +++ b/zookeeper/README.md @@ -1,6 +1,61 @@ -mvn -pl core -am dependency:copy-dependencies +# YCSB for Zookeeper -mvn -pl zookeeper -am dependency:copy-dependencies +## README +This README describes how to run YCSB on VoltDB. -java -cp core/target/classes/:core/target/dependency/*:zookeeper/target/classes/:zookeeper/target/dependency/* site.ycsb.Client -db site.ycsb.db.ZookeeperClient \ No newline at end of file +### 1. Install Java on all the machines involved. + +Zookeeper uses Java. Either [Oracle Java](https://www.oracle.com/technetwork/java/javase/downloads/index.html) or [OpenJDK](https://openjdk.java.net/) will work. + +## 2. Install Zookeeper + +Install Zookeeper from [here](https://github.com/apache/zookeeper) + +Install the tar.gz version by following the instructions on the github page + +### 3. Install YCSB + +Download the [latest YCSB](https://github.com/brianfrankcooper/YCSB/wiki/Getting-Started) file. Follow the instructions. + +I recommend cloning the git repository and then building (since I have not tried downloading the tar.gz file). The command to do this is on the site: + + git clone git://github.com/brianfrankcooper/YCSB.git + cd YCSB + mvn clean package + +## 4. Start Zookeeper + +Once you have installed Zookeeper, run it. Instructions are on the [official site](https://zookeeper.apache.org/doc/current/zookeeperStarted.html) + +You have to create the zoo.cfg file as mentioned in the link. Enter the following information by creating it in conf/zoo.cfg: + + tickTime=2000 + dataDir=/var/lib/zookeeper + clientPort=2181 + +After that, you should be able to run: + + bin/zkServer.sh start + bin/zkCli.sh -server 127.0.0.1:2181 + +## 5. Run YCSB + +Now that you have installed YCSB and have run Zookeeper, you can run YCSB. + +Not sure if the next two commands are needed after running "mvn clean package" on YCSB, but just do them anyways :) + +First, download dependencies for core: + + mvn -pl core -am dependency:copy-dependencies + +Second, download dependencies for zookeeper: + + mvn -pl zookeeper -am dependency:copy-dependencies + + +Third, run this command: + + java -cp core/target/classes/:core/target/dependency/*:zookeeper/target/classes/:zookeeper/target/dependency/* site.ycsb.CommandLine -db site.ycsb.db.ZookeeperClient + +At this point, the command line should have started. You can type "help" to see commands. Once you do that, you can open the terminal to zookeeper and see entries added. If you want to run any workloads, follow the [YCSB Site](https://github.com/brianfrankcooper/YCSB/wiki/Running-a-Workload) \ No newline at end of file -- GitLab