Druid1.7.0在CentOS7.7源码编译
Druid是一个为在大数据集之上做实时统计分析而设计的开源数据存储。这个系统集合了一个面向列存储的层,一个分布式、shared-nothing的架构,和一个高级的索引结构,来达成在秒级以内对十亿行级别的表进行任意的探索分析。
编译平台环境
个人准备了一台Centos7的Linux服务器,X86 64位操作系统,最小化安装。静态IP:192.168.0.150(itdeer)
系统检查
[root@itdeer ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
[root@itdeer ~]# uname -a
Linux itdeer 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
创建用户
创建一个itdeer的用户,用来编译
[root@itdeer ~]# adduser itdeer
[root@itdeer ~]$ su - itdeer
依赖软件安装
[1] JDK (JDK 8, 8u92+)
需要提前安装好JDK,安装JDK可以参考JDK在Centos7.2的安装配置
[2] Maven(3.x)
安装Maven,可以参考 Linux下安装Maven
[3] Node
安装Node,可以参考NodeJS在Centos7.2上的安装
[4] Python3安装
安装Python3,可以参考Python3源码编译
编译
[1] 下载解压源码
[itdeer@study ~]$ cd /opt/
[itdeer@study opt]$ wget https://github.com/apache/druid/archive/druid-0.17.0.tar.gz
[itdeer@study opt]$ tar -zxvf druid-0.17.0.tar.gz
[itdeer@study opt]$ cd druid-druid-0.17.0
[2] 编译
[itdeer@study druid-druid-0.17.0]$ mvn clean install -Pdist -DskipTests -Dmaven.compile.fork=true -Dmaven.test.skip=true -Dcheckstyle.skip
-Pdist 打出二进制包
-DskipTests 跳过测试
-Dmaven.compile.fork=true 多核编译
-Dcheckstyle.skip 不检查代码的格式
[3] 编译完成
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Druid 0.17.0:
[INFO]
[INFO] Druid .............................................. SUCCESS [ 11.655 s]
[INFO] druid-core ......................................... SUCCESS [01:19 min]
[INFO] druid-hll .......................................... SUCCESS [ 9.901 s]
[INFO] extendedset ........................................ SUCCESS [ 9.617 s]
[INFO] druid-processing ................................... SUCCESS [01:52 min]
[INFO] druid-aws-common ................................... SUCCESS [ 7.954 s]
[INFO] druid-gcp-common ................................... SUCCESS [ 7.578 s]
[INFO] druid-console ...................................... SUCCESS [06:21 min]
[INFO] druid-server ....................................... SUCCESS [01:10 min]
[INFO] druid-indexing-hadoop .............................. SUCCESS [ 58.934 s]
[INFO] druid-indexing-service ............................. SUCCESS [ 53.180 s]
[INFO] druid-sql .......................................... SUCCESS [ 31.016 s]
[INFO] druid-services ..................................... SUCCESS [ 53.256 s]
[INFO] druid-s3-extensions ................................ SUCCESS [ 10.066 s]
[INFO] druid-datasketches ................................. SUCCESS [ 17.429 s]
[INFO] druid-histogram .................................... SUCCESS [ 14.596 s]
[INFO] mysql-metadata-storage ............................. SUCCESS [ 9.101 s]
[INFO] druid-kafka-indexing-service ....................... SUCCESS [ 19.698 s]
[INFO] druid-basic-security ............................... SUCCESS [ 15.904 s]
[INFO] druid-lookups-cached-global ........................ SUCCESS [ 11.975 s]
[INFO] simple-client-sslcontext ........................... SUCCESS [ 8.973 s]
[INFO] druid-integration-tests ............................ SUCCESS [ 14.790 s]
[INFO] druid-benchmarks ................................... SUCCESS [01:09 min]
[INFO] druid-avro-extensions .............................. SUCCESS [ 16.124 s]
[INFO] druid-bloom-filter ................................. SUCCESS [ 13.264 s]
[INFO] druid-kerberos ..................................... SUCCESS [ 10.199 s]
[INFO] druid-hdfs-storage ................................. SUCCESS [ 12.855 s]
[INFO] druid-stats ........................................ SUCCESS [ 14.486 s]
[INFO] druid-kafka-extraction-namespace ................... SUCCESS [ 10.980 s]
[INFO] druid-kinesis-indexing-service ..................... SUCCESS [ 18.595 s]
[INFO] druid-orc-extensions ............................... SUCCESS [ 12.400 s]
[INFO] druid-parquet-extensions ........................... SUCCESS [ 13.060 s]
[INFO] postgresql-metadata-storage ........................ SUCCESS [ 9.308 s]
[INFO] druid-protobuf-extensions .......................... SUCCESS [ 10.989 s]
[INFO] druid-lookups-cached-single ........................ SUCCESS [ 10.654 s]
[INFO] druid-ec2-extensions ............................... SUCCESS [ 10.300 s]
[INFO] druid-google-extensions ............................ SUCCESS [ 7.722 s]
[INFO] druid-influx-extensions ............................ SUCCESS [ 6.498 s]
[INFO] druid-azure-extensions ............................. SUCCESS [ 7.467 s]
[INFO] druid-cassandra-storage ............................ SUCCESS [ 6.494 s]
[INFO] dropwizard-emitter ................................. SUCCESS [ 9.348 s]
[INFO] druid-cloudfiles-extensions ........................ SUCCESS [ 7.530 s]
[INFO] graphite-emitter ................................... SUCCESS [ 11.279 s]
[INFO] druid-distinctcount ................................ SUCCESS [ 7.010 s]
[INFO] statsd-emitter ..................................... SUCCESS [ 6.976 s]
[INFO] druid-time-min-max ................................. SUCCESS [ 7.317 s]
[INFO] druid-virtual-columns .............................. SUCCESS [ 7.026 s]
[INFO] druid-thrift-extensions ............................ SUCCESS [ 14.569 s]
[INFO] ambari-metrics-emitter ............................. SUCCESS [ 9.034 s]
[INFO] sqlserver-metadata-storage ......................... SUCCESS [ 9.256 s]
[INFO] kafka-emitter ...................................... SUCCESS [ 7.079 s]
[INFO] druid-redis-cache .................................. SUCCESS [ 9.446 s]
[INFO] druid-opentsdb-emitter ............................. SUCCESS [ 9.317 s]
[INFO] materialized-view-maintenance ...................... SUCCESS [ 9.991 s]
[INFO] materialized-view-selection ........................ SUCCESS [ 10.142 s]
[INFO] druid-momentsketch ................................. SUCCESS [ 7.621 s]
[INFO] druid-moving-average-query ......................... SUCCESS [ 12.370 s]
[INFO] tdigestsketch ...................................... SUCCESS [ 11.191 s]
[INFO] druid-influxdb-emitter ............................. SUCCESS [ 7.081 s]
[INFO] distribution ....................................... SUCCESS [02:38 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26:44 min
[INFO] Finished at: 2020-02-18T19:23:46+08:00
[INFO] ------------------------------------------------------------------------
问题
[1] 问题1
描述(下载linux-x64-64_binding.node下载不下来)
[INFO] druid-console ...................................... FAILURE [06:02 min]
解决方式
找到编译过程中输出的下载路径,自己从网上下载一个包或者找一个相同的包,上传到服务器上
npm的缓存目录在
/home/itdeer/.npm/node-sass/下
把linux-x64-64_binding.node放到/home/itdeer/.npm/node-sass/4.12.0/下
如下:/home/itdeer/.npm/node-sass/4.12.0/linux-x64-64_binding.node
[2] 问题2
描述(pip安装软件出现ssl不支持问题)
[itdeer@itdeer distribution]$ pip3 install pyyaml
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pyyaml==5.3
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyyaml/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyyaml/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyyaml/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyyaml/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyyaml/
解决方式
编译Python3的时候需要加入支持ssl,参考Python3安装扩展