Home druid & imply 入门实战
Post
Cancel

druid & imply 入门实战

安装配置

首先安装 zookeeper,并启动

1
2
3
4
tar zxvf zookeeper-3.4.6.tar.gz 
cd zookeeper-3.4.6
cp conf/zoo_sample.cfg  conf/zoo.cfg 
bin/zkServer.sh start

安装druid

1
2
3
curl -O http://static.druid.io/artifacts/releases/druid-0.12.3-bin.tar.gz
tar -xzf druid-0.12.3-bin.tar.gz
cd druid-0.12.3

启动druid服务

1
2
3
4
5
6
7
8
9
nohup java `cat conf-quickstart/druid/historical/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/historical:lib/*" io.druid.cli.Main server historical &

nohup java `cat conf-quickstart/druid/broker/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/broker:lib/*" io.druid.cli.Main server broker & 

nohup java `cat conf-quickstart/druid/coordinator/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/coordinator:lib/*" io.druid.cli.Main server coordinator &

nohup java `cat conf-quickstart/druid/overlord/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/overlord:lib/*" io.druid.cli.Main server overlord &

nohup java `cat conf-quickstart/druid/middleManager/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/middleManager:lib/*" io.druid.cli.Main server middleManager &

访问web地址: http://127.0.0.1:8090/console.html

上传数据

1
2
3
cd quickstart
curl -X 'POST' -H 'Content-Type:application/json' -d @examples/wikipedia-index.json http://127.0.0.1:8090/druid/indexer/v1/task
{"task":"index_wikipedia_2018-10-25T18:58:30.005Z"}

imply版本安装

1
2
3
wget https://static.imply.io/release/imply-2.7.9.tar.gz 
tar xvf imply-2.7.9.tar 

imply版本单机启动

1
 nohup bin/supervise -c conf/supervise/quickstart.conf > quickstart.log &

imply版本后台

1
http://127.0.0.1:9095

imply版本load数据

1
bin/post-index-task --file quickstart/wikipedia-index.json 

也可以用原生druid的方式

1
curl -X 'POST' -H 'Content-Type:application/json' -d @wikipedia-index.json http://127.0.0.1:8090/druid/indexer/v1/task

登入9095后台可以执行sql操作了

This post is licensed under CC BY 4.0 by the author.