搭建Kylin集群

回眸只為那壹抹淺笑 提交于 2020-01-24 14:45:00

 

[hadoop@hadoop001 software]$ tar -zxvf apache-kylin-2.6.4-bin.tar.gz -C ../app/

[hadoop@hadoop001 app]$ ln -s apache-kylin-2.6.4-bin kylin

准备Spark包

首先,在Ambari中安装Spark。

[hadoop@hadoop001 app]$ wget http://archive.apache.org/dist/spark/spark-2.3.2/spark-2.3.2-bin-hadoop2.7.tgz

[hadoop@hadoop001 app]$ tar -zxvf spark-2.3.2-bin-hadoop2.7.tgz

三台机器都执行下面命令,这里只以hadoop002为例
[hadoop@hadoop002 app]$ sudo cp spark-2.3.2-bin-hadoop2.7/jars/xercesImpl-2.9.1.jar /usr/hdp/current/spark2-client/jars/

[hadoop@hadoop002 app]$ sudo cp spark-2.3.2-bin-hadoop2.7/jars/commons-configuration-1.6.jar /usr/hdp/current/spark2-client/jars/

[hadoop@hadoop002 ~]$ sudo vim /etc/profile

export HIVE_HOME=/usr/hdp/current/hive-client
export PATH=$HIVE_HOME/bin:$PATH
export HCAT_HOME=/usr/hdp/current/hive-webhcat
export PATH=$HCAT_HOME/bin:$PATH
export HIVE_CONF=/etc/hive/conf
export KYLIN_HOME=/home/hadoop/app/kylin
export PATH=$KYLIN_HOME/bin:$PATH
export SPARK_HOME=/usr/hdp/current/spark2-client

[root@hadoop001 etc]# source /etc/profile

配置kylin

vi kylin.properties

kylin.metadata.url=kylin_2_6_4_metadata@hbase 
kylin.env.hdfs-working-dir=/kylin_2_6_4 
kylin.env.zookeeper-base-path=/kylin_2_6_4 
kylin.server.mode=all
kylin.server.cluster-servers=node01:7070
kylin.web.timezone=GMT+8
kylin.source.hive.client=cli
kylin.storage.url=hbase
kylin.source.hive.quote-enabled=false

vi $KYLIN_HOME/bin/find-hive-dependency.sh

#注释第37行
#hive_env=`hive ${hive_conf_properties} -e set 2>&1 | grep 'env:CLASSPATH'` #添加下面两行
hive -e set >/tmp/hive_env.txt 2>&1
hive_env=`grep 'env:CLASSPATH' /tmp/hive_env.txt`
#第42行变量加上双引号
if [ -z "$hive_env" ]

禁用TLD扫描 Tomcat启动时会扫描大量jar包,如果含有不符合TLD规范的jar包就报错,咱们不用jsp所以禁用即可。

vi $KYLIN_HOME/tomcat/conf/catalina.properties

找到108行,将所有tomcat.util.scan.StandardJarScanFilter.jarsToSkip=后面的所有通过\连接的 这些.jar全部删除(操作之前请备份源文件),直接改为:

tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar

[hadoop@hadoop001 ~]$ keytool -genkey -alias kylin -keyalg RSA

密码都为123456 

[hadoop@hadoop001 ~]$ mv ~/.keystore $KYLIN_HOME/tomcat/conf

hive client权限变更

[root@hadoop001 ~]# export HADOOP_USER_NAME=hdfs

[root@hadoop001 ~]# $KYLIN_HOME/bin/check-env.sh
Retrieving hadoop conf dir...
KYLIN_HOME is set to /home/hadoop/app/kylin

启动Kylin

[root@hadoop001 bin]# ./kylin.sh start

初始用户名和密码是:ADMIN/KYLIN,全部都是大写。

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!