黑猴子的家:Kylin 快速入门之加载数据
2020-02-07 本文已影响0人
黑猴子的家
1、选中所需项目

2、Load Table

3、表名->Sync
多表之间用逗号隔开,使用default数据库,就不用添加库名

4、报错

5、查看logs


2020-02-05 10:35:00,152 ERROR [http-bio-7070-exec-10] controller.TableController:125 : Failed to load Hive Table
java.lang.NoClassDefFoundError: org/apache/hadoop/hive/conf/HiveConf
2020-02-05 10:35:00,156 ERROR [http-bio-7070-exec-10] controller.BasicController:62 :
org.apache.kylin.rest.exception.InternalErrorException: org/apache/hadoop/hive/conf/HiveConf
6、异常原因
原因是hive的lib没有加载进来
7、解决方案
1)配置环境变量
[alex@hadoop102 kylin]$ sudo vim /etc/project
export CATALINA_HOME=/opt/module/kylin/tomcat
export HIVE_CONF_DIR=$HIVE_HOME/conf
export HCAT_HOME=$HIVE_HOME/hcatalog
export KYLIN_HOME=/opt/module/kylin
export hive_dependency=$HIVE_HOME/conf:$HIVE_HOME/lib/*:$HCAT_HOME/share/hcatalog/hive-hcatalog-core-1.1.0.jar
[alex@hadoop102 kylin]$ source /etc/profile
2)编辑kylin.sh脚本
[alex@hadoop102 kylin]$ vim bin/kylin.sh
export KYLIN_HOME=/opt/module/kylin
export HBASE_CLASSPATH_PREFIX=${KYLIN_HOME}/conf:${KYLIN_HOME}/lib/*:${KYLIN_HOME}/ext/*:${hive_dependency}:${HBASE_CLASSPATH_PREFIX}
export HBASE_CLASSPATH=${HBASE_CLASSPATH}:${hive_dependency}:${kafka_dependency}:${spark_dependency}
如图所示

图片放大

(3)重启kylin
[alex@hadoop102 kylin]$ bin/kylin.sh stop
[alex@hadoop102 kylin]$ bin/kylin.sh start
尖叫提示:kylin是没有restart 参数的
8、添加数据成功
