kylin 連接 hortonworks 中的 hive 遇到的問題


    用 hortonworks(V3.1.0.0) 部署了 ambari (V2.7.3),用 ambari 部署了 hadoop 及 hive。

1.  啟動 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}

 

2. kylin 創建 module 和 cube,可是在 build cube 時發生問題。在 stackoverflow 上提了此問題,也沒有正確答案。后來還是偶然間,解決了問題。具體描述見

https://stackoverflow.com/questions/54702611/unable-to-read-hiveserver2-configs-from-zookeeper/54801284#54801284


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM