Use bundled ZooKeeper in tutorials. (#8792)

This commit is contained in:
Gian Merlino 2019-10-30 16:17:28 -07:00 committed by Vadim Ogievetsky
parent 929a8b6337
commit c922d2c3c9
5 changed files with 38 additions and 45 deletions

View File

@ -431,15 +431,8 @@ bin/start-cluster-master-no-zk-server
### With Zookeeper on Master ### 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: 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:
```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:
``` ```
bin/start-cluster-master-with-zk-server bin/start-cluster-master-with-zk-server

View File

@ -72,22 +72,6 @@ In the package, you should find:
* `lib/*` - libraries and dependencies for core Druid * `lib/*` - libraries and dependencies for core Druid
* `quickstart/*` - configuration files, sample data, and other files for the quickstart tutorials * `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 ## Start up Druid services
The following commands will assume that you are using the `micro-quickstart` single-machine configuration. If you are 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 ./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 ```bash
$ ./bin/start-micro-quickstart $ ./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. 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 ```bash
rm -rf /tmp/kafka-logs rm -rf /tmp/kafka-logs

View File

@ -38,6 +38,7 @@ WHEREAMI="$(cd "$WHEREAMI" && pwd)"
cd "$WHEREAMI/.." cd "$WHEREAMI/.."
exec java `cat "$CONFDIR"/jvm.config | xargs` \ 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 \ org.apache.zookeeper.server.quorum.QuorumPeerMain \
"$CONFDIR"/zoo.cfg "$CONFDIR"/zoo.cfg

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} %p [%t] %c - %m%n"/>
</layout>
</appender>
<root>
<priority value ="info" />
<appender-ref ref="console" />
</root>
</log4j:configuration>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{ISO8601} %p [%t] %c - %m%n"/>
</Console>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>