环境
hadoop-2.10
hive-2.3.7
spark-2.4.5
mysql-8.0.17
zookeeper-3.5.8
安装部署
官方文档
http://kylin.apache.org/cn/docs/install/index.html
在官网找到适合自己的,然后进入下载链接
然后复制下载链接
wget #{url}
例子:
wget https://mirrors.tuna.tsinghua.edu.cn/apache/kylin/apache-kylin-4.0.0-beta/apache-kylin-4.0.0-beta-bin.tar.gz
vi /etc/profile
export KYLIN_HOME=`pwd`
export PATH=$KYLIN_HOME/bin
source /etc/profile
配置文件
vi /${KYLIN_HOME}/conf/kylin.properties
修改点:
#### METADATA | ENV ###
#
## The metadata store has two implementations(RDBMS/HBase), while RDBMS is recommended in Kylin 4.X## Working folder in HDFS, better be qualified absolute path, make sure user has the right permission to this directory
kylin.env.hdfs-working-dir=hdfs://ip:port/kylin
## Please refer to https://cwiki.apache.org/confluence/display/KYLIN/How+to+use+HBase+metastore+in+Kylin+4.0 if you prefer HBase
kylin.metadata.url=kylin_metadata@jdbc,url=jdbc:mysql://ip:3306/kylin,username=xxxxxxxx,password=xxxxxxx,maxActive=10,maxIdle=10
## Hadoop conf folder, will export this as "HADOOP_CONF_DIR" to run spark-submit
## This must contain site xmls of core, yarn, hive, and hbase in one folder
kylin.env.hadoop-conf-dir=/bigdata/hadoop-2.10.0/etc/hadoop
启动
$KYLIN_HOME/bin/check-env.sh
$KYLIN_HOME/bin/kylin.sh start
报错
Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.RuntimeException: Fail to check or create znode for chRoot /kylin/kylin_metadata due to
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2263)
at com.google.common.cache.LocalCache.get(LocalCache.java:4000)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4789)
at org.apache.kylin.common.util.ZKUtil.getZookeeperClient(ZKUtil.java:144)
... 45 more
Caused by: java.lang.RuntimeException: Fail to check or create znode for chRoot /kylin/kylin_metadata due to
at org.apache.kylin.common.util.ZKUtil.createZkChRootIfNecessary(ZKUtil.java:209)
at org.apache.kylin.common.util.ZKUtil.newZookeeperClient(ZKUtil.java:187)
解决方案
原因:没找到zookeeper下的文件夹
### 进入zookeeper
zkCli.sh
[zk: localhost:2181(CONNECTED) 1] ls /
### 如果没有kylin 就新建
### create 创建节点
### create [-s] [-e] path data acl 可以注意一下各个版本的变化
[zk: localhost:2181(CONNECTED) 1] create /kylin
[zk: localhost:2181(CONNECTED) 1] quit
修改配置文件
## kylin zk base path
kylin.env.zookeeper-base-path=/kylin
#
## Run a TestingServer for curator locally
kylin.env.zookeeper-is-local=false
#
## Connect to a remote zookeeper with the url, should set kylin.env.zookeeper-is-local to false
kylin.env.zookeeper-connect-string=IP:2181
重启即可
$KYLIN_HOME/bin/check-env.sh
$KYLIN_HOME/bin/kylin.sh start
web访问 ip:7070/kylin
#样例生成
$KYLIN_HOME/bin/sample.sh
#在web的项目那边会有learn-kylin
博主公众号
求关注