转载,kylin的安装文档

1.   前提

hadoop版本:2.2-2.6

hbase:0.98

hive:1.0.1

zookeeper:3.4.5

kylin:1.1.1

2.   上传

3.   解压

tar –zxvf xxxx.tar.gz

4.   重命名

mv xxxx xxxx

5.   修改环境变量

配置tomcat和kylin

export CATALINA_HOME=/home/hadoop/kylin/tomcat

export PATH=$PATH:$CATALINA_HOME/bin

 

export KYLIN_HOME=/home/hadoop/kylin

export PATH=$PATH:$KYLIN_HOME/bin

 

6.   修改配置文件

6.1.  修改bin/kylin.sh

#!/bin/bash

 

#

# Licensed to the Apache Software Foundation (ASF) under one or more

# contributor license agreements.  See the NOTICE file distributed with

# this work for additional information regarding copyright ownership.

# The ASF licenses this file to You under the Apache License, Version 2.0

# (the "License"); you may not use this file except in compliance with

# the License.  You may obtain a copy of the License at

#

#    http://www.apache.org/licenses/LICENSE-2.0

#

# Unless required by applicable law or agreed to in writing, software

# distributed under the License is distributed on an "AS IS" BASIS,

# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

# See the License for the specific language governing permissions and

# limitations under the License.

#

export KYLIN_HOME=/home/hadoop/kylin

dir=$(dirname ${0})

source ${dir}/check-env.sh

mkdir -p ${KYLIN_HOME}/logs

 

# start command

if [ $1 == "start" ]

then

 

    if [ -f "${KYLIN_HOME}/pid" ]

    then

        PID=`cat $KYLIN_HOME/pid`

        if ps -p $PID > /dev/null

        then

          echo "Kylin is running, stop it first"

          exit 1

        fi

    fi

   

    tomcat_root=${dir}/../tomcat

    export tomcat_root

 

 

    #The location of all hadoop/hbase configurations are difficult to get.

    #Plus, some of the system properties are secretly set in hadoop/hbase shell command.

    #For example, in hdp 2.2, there is a system property called hdp.version,

    #which we cannot get until running hbase or hadoop shell command.

    #

    #To save all these troubles, we use hbase runjar to start tomcat.

    #In this way we no longer need to explicitly configure hadoop/hbase related classpath for tomcat,

    #hbase command will do all the dirty tasks for us:

 

 

 

    useSandbox=`sh ${KYLIN_HOME}/bin/get-properties.sh kylin.sandbox`

    spring_profile="default"

    if [ "$useSandbox" = "true" ]

        then spring_profile="sandbox"

    fi

 

    #retrive $hive_dependency and $hbase_dependency

    source ${dir}/find-hive-dependency.sh

    source ${dir}/find-hbase-dependency.sh

    #retrive $KYLIN_EXTRA_START_OPTS

    if [ -f "${dir}/setenv.sh" ]

        then source ${dir}/setenv.sh

    fi

 

    export HBASE_CLASSPATH_PREFIX=${tomcat_root}/bin/bootstrap.jar:${tomcat_root}/bin/tomcat-juli.jar:${tomcat_root}/lib/*:$hive_dependency:$HBASE_CLASSPATH_PREFIX

    export HBASE_CLASSPATH=$hive_dependency:${HBASE_CLASSPATH}

   

    #debug if encounter NoClassDefError

    #hbase classpath

 

    hbase ${KYLIN_EXTRA_START_OPTS} \

    -Djava.util.logging.config.file=${tomcat_root}/conf/logging.properties \

    -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \

    -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true \

    -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true \

    -Djava.endorsed.dirs=${tomcat_root}/endorsed  \

    -Dcatalina.base=${tomcat_root} \

    -Dcatalina.home=${tomcat_root} \

    -Djava.io.tmpdir=${tomcat_root}/temp  \

    -Dkylin.hive.dependency=${hive_dependency} \

    -Dkylin.hbase.dependency=${hbase_dependency} \

    -Dspring.profiles.active=${spring_profile} \

    org.apache.hadoop.util.RunJar ${tomcat_root}/bin/bootstrap.jar  org.apache.catalina.startup.Bootstrap start >> ${tomcat_root}/logs/kylin.log 2>&1 & echo $! > ${KYLIN_HOME}/pid &

    echo "A new Kylin instance is started by $USER, stop it using \"kylin.sh stop\""

    if [ "$useSandbox" = "true" ]

        then echo "Please visit http://<your_sandbox_ip>:7070/kylin to play with the cubes! (Useranme: ADMIN, Password: KYLIN)"

    else

        echo "Please visit http://<ip>:7070/kylin"

    fi

    echo "You can check the log at ${tomcat_root}/logs/kylin.log"

    exit 0

 

# stop command

elif [ $1 == "stop" ]

then

    if [ -f "${KYLIN_HOME}/pid" ]

    then

        PID=`cat $KYLIN_HOME/pid`

        if ps -p $PID > /dev/null

        then

           echo "stopping Kylin:$PID"

           kill $PID

           rm ${KYLIN_HOME}/pid

           exit 0

        else

           echo "Kylin is not running, please check"

           exit 1

        fi

       

    else

        echo "Kylin is not running, please check"

        exit 1   

    fi

   

# tool command

elif [[ $1 = org.apache.kylin.* ]]

then

    #retrive $hive_dependency and $hbase_dependency

    source ${dir}/find-hive-dependency.sh

    source ${dir}/find-hbase-dependency.sh

    #retrive $KYLIN_EXTRA_START_OPTS

    if [ -f "${dir}/setenv-tool.sh" ]

        then source ${dir}/setenv-tool.sh

    fi

 

    export HBASE_CLASSPATH=${KYLIN_HOME}/lib/*:$hive_dependency:${HBASE_CLASSPATH}

 

    exec hbase "$@"

 

else

    echo "usage: kylin.sh start or kylin.sh stop"

    exit 1

fi

6.2.  kylin.propertys

#

# Licensed to the Apache Software Foundation (ASF) under one or more

# contributor license agreements.  See the NOTICE file distributed with

# this work for additional information regarding copyright ownership.

# The ASF licenses this file to You under the Apache License, Version 2.0

# (the "License"); you may not use this file except in compliance with

# the License.  You may obtain a copy of the License at

#

#    http://www.apache.org/licenses/LICENSE-2.0

#

# Unless required by applicable law or agreed to in writing, software

# distributed under the License is distributed on an "AS IS" BASIS,

# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

# See the License for the specific language governing permissions and

# limitations under the License.

#

 

## Config for Kylin Engine ##

 

# List of web servers in use, this enables one web server instance to sync up with other servers.

# 配置web服务器ip和端口

kylin.rest.servers=localhost:7070

 

#set display timezone on UI,format like[GMT+N or GMT-N]

# 时区

kylin.rest.timezone=GMT-8

 

# The metadata store in hbase

#配置hbase的访问路径,格式为:

#hbase:zookeeperIp,ip2:2181:/hbase在zookeeper上注册的根目录

kylin.metadata.url=hbase:master2:2181:/hbase

 

# The storage for final cube file in hbase

kylin.storage.url=hbase

 

# Temp folder in hdfs, make sure user has the right access to the hdfs directory

# hdfs的kylin根目录

kylin.hdfs.working.dir=hdfs://hadoop-cluster1/kylin

 

# HBase Cluster FileSystem, which serving hbase, format as hdfs://hbase-cluster:8020

# leave empty if hbase running on same cluster with hive and mapreduce

# hdfs的默认路径

kylin.hbase.cluster.fs=hdfs://hadoop-cluster1

 

kylin.job.mapreduce.default.reduce.input.mb=500

 

kylin.server.mode=all

 

# If true, job engine will not assume that hadoop CLI reside on the same server as it self

# you will have to specify kylin.job.remote.cli.hostname, kylin.job.remote.cli.username and kylin.job.remote.cli.password

# It should not be set to "true" unless you're NOT running Kylin.sh on a hadoop client machine

# (Thus kylin instance has to ssh to another real hadoop client machine to execute hbase,hive,hadoop commands)

kylin.job.run.as.remote.cmd=false

 

# Only necessary when kylin.job.run.as.remote.cmd=true

kylin.job.remote.cli.hostname=

 

# Only necessary when kylin.job.run.as.remote.cmd=true

kylin.job.remote.cli.username=

 

# Only necessary when kylin.job.run.as.remote.cmd=true

kylin.job.remote.cli.password=

 

# Used by test cases to prepare synthetic data for sample cube

kylin.job.remote.cli.working.dir=/home/hadoop/kylin

 

# Max count of concurrent jobs running

kylin.job.concurrent.max.limit=10

 

# Time interval to check hadoop job status

kylin.job.yarn.app.rest.check.interval.seconds=10

 

# Hive database name for putting the intermediate flat tables

kylin.job.hive.database.for.intermediatetable=default

 

#default compression codec for htable,snappy,lzo,gzip,lz4

kylin.hbase.default.compression.codec=snappy

 

# The cut size for hbase region, in GB.

# E.g, for cube whose capacity be marked as "SMALL", split region per 10GB by default

kylin.hbase.region.cut.small=10

kylin.hbase.region.cut.medium=20

kylin.hbase.region.cut.large=100

 

# HBase min and max region count

kylin.hbase.region.count.min=1

kylin.hbase.region.count.min=500

 

## Config for Restful APP ##

# database connection settings:

ldap.server=

ldap.username=

ldap.password=

ldap.user.searchBase=

ldap.user.searchPattern=

ldap.user.groupSearchBase=

ldap.service.searchBase=OU=

ldap.service.searchPattern=

ldap.service.groupSearchBase=

acl.adminRole=

acl.defaultRole=

ganglia.group=

ganglia.port=8664

 

## Config for mail service

 

# If true, will send email notification;

mail.enabled=false

mail.host=

mail.username=

mail.password=

mail.sender=

 

###########################config info for web#######################

 

#help info ,format{name|displayName|link} ,optional

kylin.web.help.length=4

kylin.web.help.0=start|Getting Started|

kylin.web.help.1=odbc|ODBC Driver|

kylin.web.help.2=tableau|Tableau Guide|

kylin.web.help.3=onboard|Cube Design Tutorial|

#hadoop url link ,optional

kylin.web.hadoop=

#job diagnostic url link ,optional

kylin.web.diagnostic=

#contact mail on web page ,optional

kylin.web.contact_mail=

 

###########################config info for front#######################

 

#env DEV|QA|PROD

deploy.env=DEV

 

###########################config info for sandbox#######################

kylin.sandbox=true

 

 

###########################config info for kylin monitor#######################

# hive jdbc url

kylin.monitor.hive.jdbc.connection.url=jdbc:hive2://master1:10000/default

 

#config where to parse query log,split with comma ,will also read $KYLIN_HOME/tomcat/logs/ by default

kylin.monitor.ext.log.base.dir = /home/hadoop/kylin_log1,/home/hadoop/kylin_log2

 

#will create external hive table to query result csv file

#will set to kylin_query_log by default if not config here

kylin.monitor.query.log.parse.result.table = kylin_query_log

#添加依赖jar包

kylin.job.jar=/home/hadoop/kylin/lib/kylin-job-1.1.1-incubating.jar

kylin.coprocessor.local.jar=/home/hadoop/kylin/lib/kylin-coprocessor-1.1.1-incubating.jar

 

7.   启动

kylin.sh start

kylin.sh stop

8.   浏览器页面

http://ip:7070/kylin

用户名:ADMIN

密码:KYLIN

9.   注意事项

如果web项目无法访问,将kylin.war解压后放到ROOT项目下

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值