请选择 进入手机版 | 继续访问电脑版
 找回密码
 立即注册

快捷登录

搜索

Kylin源码编译

一、下载源码

git clone https://github.com/apache/kylin kylin

二、安装maven、nodejs

1.maven的安装参照百度,这里不再赘述

2.nodejs的安装

##添加 epel 源
rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

导入 key:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

##添加 remi 源
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-remi

安装完成后,执行
curl --silent --location https://rpm.nodesource.com/setup_5.x | bash -
yum -y install nodejs

留意:node npm版本需求符合kylin编译要求

三、编译kylin

环境预备::

1.1下载PhantomJS参考:http://www.cnblogs.com/zengguowang/p/6911812.html

下载地址:https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2

wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2

1.2解压

bzip2 -d phantomjs-2.1.1-linux-x86_64.tar.bz2

tar xvf phantomjs-2.1.1-linux-x86_64.tar -C /usr/local/

1.3安装依赖

安装依赖软件

yum -y install wget fontconfig

mv /usr/local/phantomjs-2.1.1-linux-x86_64/ /usr/local/phantomjs

1.4环境变量设置

vim /etc/profile

#set for phantomjs

PHANTOMJS_HOME=/usr/local/phantomjs

PATH=$PATH:$PHANTOMJS_HOME/bin

export PHANTOMJS_HOME PATH

source /etc/profile

1.5验证

phantomjs

vi ~/.bash_profile 中添加一行,不然执行sudo 命令编译会有成绩;

alias sudo="sudo env PATH=$PATH"

source ~/.bash_profile

末尾编译

cd kylin/build/script

sudo ./package.sh -P cdh5.7

出现以下界面,说编译成功
Kylin源码编译-1.jpg

留意:假如存在编译权限成绩,需求带sudo,还要留意hadoop环境变量设置成绩

cdh5.7不能输错,不然编译 处理 kylin启动不了,如下错误:
/kylin_metadata/lock
Exception in thread "main" java.lang.IllegalArgumentException: Failed to find metadata store by url: kylin_metadata@hbase
at org.apache.kylin.common.persistence.ResourceStore.createResourceStore(ResourceStore.java:89)
at org.apache.kylin.common.persistence.ResourceStore.getStore(ResourceStore.java:101)
at org.apache.kylin.rest.service.AclTableMigrationTool.checkIfNeedMigrate(AclTableMigrationTool.java:94)
at org.apache.kylin.tool.AclTableMigrationCLI.main(AclTableMigrationCLI.java:41)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.kylin.common.persistence.ResourceStore.createResourceStore(ResourceStore.java:83)
... 3 more
Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.hbase.HTableDescriptor.addFamily(Lorg/apache/hadoop/hbase/HColumnDescriptor;)Lorg/apache/hadoop/hbase/HTableDescriptor;
at org.apache.kylin.storage.hbase.HBaseConnection.createHTableIfNeeded(HBaseConnection.java:320)
at org.apache.kylin.storage.hbase.HBaseResourceStore.createHTableIfNeeded(HBaseResourceStore.java:110)
at org.apache.kylin.storage.hbase.HBaseResourceStore.(HBaseResourceStore.java:91)
... 8 more
2017-10-18 16:53:46,956 INFO [Thread-1] client.ConnectionManager$HConnectionImplementation:1705 : Closing zookeeper sessionid=0x35ec685fa820019
2017-10-18 16:53:46,962 INFO [Thread-1] zookeeper.ZooKeeper:684 : Session: 0x35ec685fa820019 closed
2017-10-18 16:53:46,962 INFO [main-EventThread] zookeeper.ClientCnxn:512 : EventThread shut down
2017-10-18 16:53:46,971 INFO [Thread-6] zookeeper.ZooKeeper:684 : Session: 0x25ec685f9a60023 closed
2017-10-18 16:53:46,971 INFO [main-EventThread] zookeeper.ClientCnxn:512 : EventThread shut down
ERROR: Unknown error. Please check full log.

四、安装

解压

cd dist

tar -xzvf apache-kylin-2.6.0-SNAPSHOT-bin.tar.gz -C /home/dw/proc

环境变量设置

kylin配置文件修正

参考集群安装

五、晋级

备份配置文件

$KYLIN_HOME/conf/*

$KYLIN_HOME/tomcat/conf/

覆盖$KYLIN_HOME目录

检查配置文件,合并配置文件;最好不要直接覆盖,能够会出现成绩
回复

使用道具 举报

大神点评3

嘘,低调。
回复

使用道具 举报

gREENGuy 7 天前 来自手机 显示全部楼层
支持支持再支持
回复

使用道具 举报

鄙视楼下的顶帖没我快,哈哈
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册