官网下载最新版包 官网说明:https://druid.apache.org/docs/latest/tutorials/cluster.html 准备4台服务器:1个master、2个data、1个query,整体架构如下图
安装包目录结构: 修改common配置文件
vim conf/druid/cluster/_common/common.runtime.properties
druid.extensions.loadList=["druid-hdfs-storage", "druid-kafka-indexing-service", "druid-datasketches","mysql-metadata-storage"]
druid.zk.service.host=zk-slave1:2181,zk-slave2:2181,zk-slave3:2181
druid.zk.paths.base=/druid
druid.metadata.storage.type=mysql
druid.metadata.storage.connector.connectURI=jdbc:mysql:
druid.metadata.storage.connector.user=root
druid.metadata.storage.connector.password=123456
druid.storage.type=hdfs
druid.storage.storageDirectory=/druid/segments
druid.indexer.logs.type=hdfs
druid.indexer.logs.directory=/druid/indexing-logs
core-site.xml, hdfs-site.xml, yarn-site.xml, mapred-site.xml copy到_common目录
cp /opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/etc/hadoop/conf.dist/core-site.xml conf/druid/cluster/_common/
cp /opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/etc/hadoop/conf.dist/hdfs-site.xml conf/druid/cluster/_common/
cp /opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/etc/hadoop/conf.dist/yarn-site.xml conf/druid/cluster/_common/
cp /opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/etc/hadoop/conf.dist/mapred-site.xml conf/druid/cluster/_common/
mysql驱动放入指定目录:extensions/mysql-metadata-storage 例如:mysql-connector-java-5.1.48.jar 放入对应的目录下
将修改后的druid压缩打包scp到其他节点 master启动 bin/start-cluster-master-no-zk-server
data启动 bin/start-cluster-data-server
query启动 bin/start-cluster-query-server
attention: zookeeper为外部共用的,这边就没有单独搭建
|