Kylin 安装
下载
复制代码
1
2
3
4
5从 Apache Kylin下载网站(https://kylin.apache.org/download/) 下载一个适用于您 Hadoop 版本的二进制文件。 例如,适用于 HBase 1.x 的 Kylin 2.5.0 可通过如下命令行下载得到: cd /usr/local/ wget http://mirror.bit.edu.cn/apache/kylin/apache-kylin-2.5.0/apache-kylin-2.5.0-bin-hbase1x.tar.gz
解压
复制代码
1
2
3
4解压 tar 包,配置环境变量 $KYLIN_HOME 指向 Kylin 文件夹。 tar -zxvf apache-kylin-2.5.0-bin-hbase1x.tar.gz cd apache-kylin-2.5.0-bin-hbase1x
配置KYLIN_HOME
复制代码
1
2export KYLIN_HOME=`pwd`
配置SPARK_HOME
复制代码
1
2
3
4
5从 v2.6.1 开始, Kylin 不再包含 Spark 二进制包; 您需要另外下载 Spark,然后设置 SPARK_HOME 系统变量到 Spark 安装目录: export SPARK_HOME=/usr/hdp/3.0.0.0-1634/spark2 或者使用脚本下载: $KYLIN_HOME/bin/download-spark.sh
检查运行环境
复制代码
1
2$KYLIN_HOME/bin/check-env.sh
启动Kylin
复制代码
1
2$KYLIN_HOME/bin/kylin.sh start
停止Kylin
复制代码
1
2$KYLIN_HOME/bin/kylin.sh stop
报错情况 + 解决方案
1. hdfs权限问题
复制代码
1
2
3
4
5
6
7① 高级 hdfs-site dfs.permissions.enabled false ← true ② 自定义 core-site hadoop.proxyuser.hive.hosts * ← tst-dev-bg-6-2.novalocal hadoop.proxyuser.oozie.hosts * ← tst-dev-bg-6-2.novalocal hadoop.proxyuser.root.hosts * ← tst-dev-bg-6-3.novalocal
2. Retrieving hive dependency…卡住
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13由于公司环境配置hive默认连接hiveserver2 ,不管hive cli 还是beeline cli都默认使用beeline cli,连接hive需要输入账号密码; 启动kylin 时会Retrieving hive dependency... 卡住 两种解决方案: (此处选择方案2) ①.解决方案1 敲enter 但在在后续构建cube的第一步Create Intermediate Flat Hive Table时,web 界面 log 显示 no Data Available ; 服务器kylin.log在 hive.CreateFlatHiveTableStep:38 : hive -e "USE default;一直卡住。 ②.解决方案2 修改:kylin.properties kylin.source.hive.client=beeline kylin.source.hive.beeline-params=-n user -p password --hiveconf hive.security.authorization.sqlstd.confwhitelist.append='mapreduce.job.*|dfs.*' -u jdbc:hive2://ip:10000
3.Something wrong with Hive CLI or Beeline, please execute Hive CLI or Beeline CLI in terminal to find the root cause.
复制代码
1
2在该节点安装并启动HiveServer2
4. Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
复制代码
1
2
3
4
5
6
7
8将tomcat/conf/server.xml的85-88这4行注释掉: <!-- <Connector port="7443" protocol="org.apache.coyote.http11.Http11Protocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" keystoreFile="conf/.keystore" keystorePass="changeit" clientAuth="false" sslProtocol="TLS" /> -->
5. java.lang.ClassNotFoundException: org.apache.commons.configuration.Configuration
复制代码
1
2在lib包中添加commons-configuration-1.10-bin.tar.gz包
6. vim find-hive-dependency.sh
数据迁移
备份元数据
复制代码
1
2
3
4./bin/metastore.sh backup 来将你的元数据导出到本地目录,这个目录在KYLIN_HOME/metadata_backps下, 它的命名规则使用了当前时间作为参数:KYLIN_HOME/meta_backups/meta_year_month_day_hour_minute_second
恢复元数据
复制代码
1
2./bin/metastore.sh restore $KYLIN_HOME/meta_backups/meta_xxxx_xx_xx_xx_xx_xx
在恢复完成后,单击 Web UI 上的“Reload Metadata”按钮以刷新缓存
复制代码
1
2重启效果一样
Model页面重新build各个Project下的cube
Insight页面查询数据结果
最后
以上就是独特未来最近收集整理的关于Kylin迁移安装文档的全部内容,更多相关Kylin迁移安装文档内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复