From c922d2c3c964fd72344f1673fb60a672c22fbb75 Mon Sep 17 00:00:00 2001 From: Gian Merlino Date: Wed, 30 Oct 2019 16:17:28 -0700 Subject: [PATCH] Use bundled ZooKeeper in tutorials. (#8792) --- docs/tutorials/cluster.md | 11 ++--------- docs/tutorials/index.md | 20 ++------------------ examples/bin/run-zk | 3 ++- examples/conf/zk/log4j.xml | 17 ----------------- examples/conf/zk/log4j2.xml | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 38 insertions(+), 45 deletions(-) delete mode 100644 examples/conf/zk/log4j.xml create mode 100644 examples/conf/zk/log4j2.xml diff --git a/docs/tutorials/cluster.md b/docs/tutorials/cluster.md index 26a5d27a4ba..ad3cb3c2bf4 100644 --- a/docs/tutorials/cluster.md +++ b/docs/tutorials/cluster.md @@ -431,15 +431,8 @@ bin/start-cluster-master-no-zk-server ### With Zookeeper on Master -If you plan to run ZK on Master servers, first update `conf/zoo.cfg` to reflect how you plan to run ZK. Then log on to your Master servers and install Zookeeper: - -```bash -curl http://www.gtlib.gatech.edu/pub/apache/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz -o zookeeper-3.4.14.tar.gz -tar -xzf zookeeper-3.4.14.tar.gz -mv zookeeper-3.4.14 zk -``` - -If you are running ZK on the Master server, you can start the Master server processes together with ZK using: +If you plan to run ZK on Master servers, first update `conf/zoo.cfg` to reflect how you plan to run ZK. Then, you +can start the Master server processes together with ZK using: ``` bin/start-cluster-master-with-zk-server diff --git a/docs/tutorials/index.md b/docs/tutorials/index.md index 6eb7bef9b90..53e5a3e5006 100644 --- a/docs/tutorials/index.md +++ b/docs/tutorials/index.md @@ -72,22 +72,6 @@ In the package, you should find: * `lib/*` - libraries and dependencies for core Druid * `quickstart/*` - configuration files, sample data, and other files for the quickstart tutorials -## Download Zookeeper - -Druid has a dependency on [Apache ZooKeeper](http://zookeeper.apache.org/) for distributed coordination. You'll -need to download and run Zookeeper. - -In the package root, run the following commands: - -```bash -curl https://archive.apache.org/dist/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz -o zookeeper-3.4.14.tar.gz -tar -xzf zookeeper-3.4.14.tar.gz -mv zookeeper-3.4.14 zk -``` - -The startup scripts for the tutorial will expect the contents of the Zookeeper tarball to be located at `zk` under the -apache-druid-{{DRUIDVERSION}} package root. - ## Start up Druid services The following commands will assume that you are using the `micro-quickstart` single-machine configuration. If you are @@ -100,7 +84,7 @@ From the apache-druid-{{DRUIDVERSION}} package root, run the following command: ./bin/start-micro-quickstart ``` -This will bring up instances of Zookeeper and the Druid services, all running on the local machine, e.g.: +This will bring up instances of ZooKeeper and the Druid services, all running on the local machine, e.g.: ```bash $ ./bin/start-micro-quickstart @@ -200,7 +184,7 @@ Once every service has started, you are now ready to load data. If you completed [Tutorial: Loading stream data from Kafka](./tutorial-kafka.md) and wish to reset the cluster state, you should additionally clear out any Kafka state. -Shut down the Kafka broker with CTRL-C before stopping Zookeeper and the Druid services, and then delete the Kafka log directory at `/tmp/kafka-logs`: +Shut down the Kafka broker with CTRL-C before stopping ZooKeeper and the Druid services, and then delete the Kafka log directory at `/tmp/kafka-logs`: ```bash rm -rf /tmp/kafka-logs diff --git a/examples/bin/run-zk b/examples/bin/run-zk index e23d63e6803..c6345d9dc2d 100755 --- a/examples/bin/run-zk +++ b/examples/bin/run-zk @@ -38,6 +38,7 @@ WHEREAMI="$(cd "$WHEREAMI" && pwd)" cd "$WHEREAMI/.." exec java `cat "$CONFDIR"/jvm.config | xargs` \ - -cp "$WHEREAMI/../zk/lib/*:$WHEREAMI/../zk/*:$CONFDIR" \ + -cp "$WHEREAMI/../lib/*:$CONFDIR" \ + -Dzookeeper.jmx.log4j.disable=true \ org.apache.zookeeper.server.quorum.QuorumPeerMain \ "$CONFDIR"/zoo.cfg diff --git a/examples/conf/zk/log4j.xml b/examples/conf/zk/log4j.xml deleted file mode 100644 index 5ed9b01bdc8..00000000000 --- a/examples/conf/zk/log4j.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/examples/conf/zk/log4j2.xml b/examples/conf/zk/log4j2.xml new file mode 100644 index 00000000000..0ad3c404dbb --- /dev/null +++ b/examples/conf/zk/log4j2.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + +