Druid mac安装

318 阅读1分钟

1 Mac位置

/Users/yaojianguo/workspace/Assembles/druid/apache-druid-0.17.0

2 启动Druid服务

./bin/start-micro-quickstart

访问:http://localhost:8888

2.1 Loading data

Load data into Kafka

创建一个Topic

$ bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic wikipedia

In your Druid directory, run the following command:

$ cd quickstart/tutorial
$ gunzip -c wikiticker-2015-09-12-sampled.json.gz > wikiticker-2015-09-12-sampled.json

In your Kafka directory, run the following command, where {PATH_TO_DRUID} is replaced by the path to the Druid directory:

export KAFKA_OPTS="-Dfile.encoding=UTF-8"
$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic wikipedia < {PATH_TO_DRUID}/quickstart/tutorial/wikiticker-2015-09-12-sampled.json

# mac本地
$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic wikipedia < ../../druid/apache-druid-0.17.0/quickstart/tutorial/wikiticker-2015-09-12-sampled.json

Once the data is located, you can click "Next: Parse data" to go to the next step.

click Next: Parse time to get to the step centered around determining your primary timestamp column.