Kylin 安装以及spark cube 的创建

一. 准备
下载kylin安装包
http://www.apache.org/dyn/closer.cgi/kylin/apache-kylin-2.2.0/apache-kylin-2.2.0-bin-hbase1x.tar.gz

二. 环境
1. Hadoop: 2.7+
Hive: 0.13 - 1.2.1+
HBase: 0.98 - 0.99, 1.1+
JDK: 1.7+
2. hdp2.4或hdp2.5
三. 安装过程
1. 上传安装包 /opt/apache-kylin-2.2.0-bin-hbase1x.tar.gz,并解压
2. 配置KYLIN_HOME环境变量,修改/etc/profile
KYLIN_HOME=/opt/apache-kylin-2.2.0-bin
PATH= PATH: P A T H : KYLIN_HOME/bin
3. run check-env.sh 检查环境,
4. 执行 kylin.sh start ,没有error,就可以访问http://:7070/kylin,初始账号ADMIN/KYLIN
5. 如果不使用spark引擎,安装的上一步即可,若配置spark引擎需要进行以下操作
1) 连接关于spark的配置文件(或拷贝)

mkdir $KYLIN_HOME/hadoop-conf
ln -s /etc/hadoop/conf/core-site.xml $KYLIN_HOME/hadoop-conf/core-site.xml 
ln -s /etc/hadoop/conf/hdfs-site.xml $KYLIN_HOME/hadoop-conf/hdfs-site.xml 
ln -s /etc/hadoop/conf/yarn-site.xml $KYLIN_HOME/hadoop-conf/yarn-site.xml 
ln -s /etc/hbase/2.4.0.0-169/0/hbase-site.xml $KYLIN_HOME/hadoop-conf/hbase-site.xml 
cp /etc/hive/2.4.0.0-169/0/hive-site.xml $KYLIN_HOME/hadoop-conf/hive-site.xml 

2) 编辑hive-site.xml

vi $KYLIN_HOME/hadoop-conf/hive-site.xml (change "hive.execution.engine" value from "tez" to "mr")

3) 编辑 $KYLIN_HOME/conf/kylin.properties,修改属性

kylin.env.hadoop-conf-dir=/usr/local/apache-kylin-2.1.0-bin-hbase1x/hadoop-conf

4) spark引擎用的是 kylin 自带的spark1.6,所以还需要修改一些spark参数,vi $KYLIN_HOME/conf/kylin.properties 下面的参数默认是注释的,需要取消注释(特别注意红色字体部分),

kylin.engine.spark-conf.spark.executor.memry 和kylin.engine.spark-conf.spark.executor.cores 可以根据环境适量调大
kylin.engine.spark-conf.spark.master=yarn
kylin.engine.spark-conf.spark.submit.deployMode=cluster
kylin.engine.spark-conf.spark.yarn.queue=default
kylin.engine.spark-conf.spark.executor.memory=1G
kylin.engine.spark-conf.spark.executor.cores=2
kylin.engine.spark-conf.spark.executor.instances=1
kylin.engine.spark-conf.spark.eventLog.enabled=true
kylin.engine.spark-conf.spark.eventLog.dir=hdfs\:///kylin/spark-history
kylin.engine.spark-conf.spark.history.fs.logDirectory=hdfs\:///kylin/spark-history


#kylin.engine.spark-conf.spark.io.compression.codec=org.apache.spark.io.SnappyCompressionCodec

## uncomment for HDP
kylin.engine.spark-conf.spark.driver.extraJavaOptions=-Dhdp.version=current
kylin.engine.spark-conf.spark.yarn.am.extraJavaOptions=-Dhdp.version=current
kylin.engine.spark-conf.spark.executor.extraJavaOptions=-Dhdp.version=current

四. 可能会出现的问题
只要严格按照配置文档或者官网,不会出现问题。
五. 参考文档
Installation Guide: https://kylin.apache.org/docs21/install/index.html
Create Spark Cube: https://kylin.apache.org/docs21/tutorial/cube_spark.html

本文出自“筱Mary”博客,转载请务必保留此处
http://blog.csdn.net/qq_31382921/article/

你可能感兴趣的:(Hadoop,Kylin,大数据入门)