Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Pre-requisites

  • OpenJDK8
  • Zookeeper
  • git
  • maven@v3.3.9

Install OpenJDK

$ sudo apt-get install openjdk-8-jdk jdk


Make sure you have the right OpenJDK version 

...

Edit zoo.cfg and the below


$ vi zoo.cfg


dataDir=/var/lib/zookeeper
server.1=node1:2888:3888
server.2=node2:2888:3888
server.3=node3:2888:3888


Now, do the below changes in log4.properties file as follows.

$ vi log4j.properties


zookeeper.log.dir=/var/log/zookeeper 
zookeeper.tracelog.dir=/var/log/zookeeper 
log4j.rootLogger=INFO, CONSOLE, ROLLINGFILE

...

$ /home/zookeeper/zookeeper-3.4.13/bin/zkServer.sh status


Zookeeper Service Status Check.

In Zookeeper ensemble If you have 3 nodes, out of them, one will be in leader mode and other two will be in follower mode. You can check the status by running the following commands. If you have just one then it will be standalone.

...

WatchedEvent state:SyncConnected type:None path:null
[zk: :2181(CONNECTED) 0]



Install Pre-requities for Build

$ sudo apt-get install git


Hooking up upstream Maven 3.3.9 (for Debian Jessie only)

$ wget http://mirror.ox.ac.uk/sites/rsync.apache.org/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz 

$ tar xvf apache-maven-3.3.9-bin.tar.gz 

$ cd apache-maven-3.3.9/bin 

$ export PATH=$PWD:$PATH

$ mvn --version