首页 > 其他 > 详细

kylin 连接 hortonworks 中的 hive 遇到的问题

时间:2019-02-20 17:31:57      阅读:672      评论:0      收藏:0      [点我收藏+]

    用 hortonworks(V3.1.0.0) 部署了 ambari (V2.7.3),用 ambari 部署了 hadoop 及 hive。启动 kylin(V2.6)时,遇到如下问题:

Retrieving hadoop conf dir...
KYLIN_HOME is set to /opt/programs/kylin
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Retrieving hive dependency...
Something wrong with Hive CLI or Beeline, please execute Hive CLI or Beeline CLI in terminal to find the root cause.

   经过查找,最后一行的错误信息是在 find-hive-dependency.sh 这个脚本中的,查看此脚本,是由于 hive_env 没有值引起的,

技术分享图片

   进一步分析脚本,发现是因为脚本中的下面这段脚本没有得到值

hive_env=`hive ${hive_conf_properties} -e set 2>&1 | grep env:CLASSPATH`

  直接在 shell 中运行上面的命令,确实没有输出。想了半天,把管道命令符前面的命令的输出,输出到一个文件。然后查找文件,发现是有 env:CLASSPATH 这一内容的。 但是为

技术分享图片

    唯一能想到的原因是:管道符命令,前面命令的输出是有大小限制的,超过多少字符后,只能把最后多少个字符传给后面的命令。

    修改 find-hive-dependency.sh,把 hive_env=`hive ${hive_conf_properties} -e set 2>&1 | grep ‘env:CLASSPATH‘` 这一行删掉,加入下面几行后,kylin 能成功启动了。

    hive -e set >/tmp/hive_env.txt 2>&1
    hive_env=`grep env:CLASSPATH /tmp/hive_env.txt`
    hive_env=`echo ${hive_env#*env:CLASSPATH}`
    hive_env="env:CLASSPATH"${hive_env}

 

kylin 连接 hortonworks 中的 hive 遇到的问题

原文:https://www.cnblogs.com/langfanyun/p/10407881.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!