Impala-shell 启动异常 - Python版本为3.x 启动脚本为2.x
生活随笔
收集整理的這篇文章主要介紹了
Impala-shell 启动异常 - Python版本为3.x 启动脚本为2.x
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
啟動 Impala-shell 報錯如下?
[root@xxx ~]# impala-shellFile "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/bin/../lib/impala-shell/impala_shell.py", line 222print '\tNo options available.'^ SyntaxError: Missing parentheses in call to 'print'發現語法不支持,2.x 與3.x 語法有很大區別,我們這臺機器python 版本為 3.x,尋找Impala-shell 執行腳本
發現在目錄?/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/bin 下
vim 查看腳本,發現最后一行有執行 python xxx
PYTHONPATH="${EGG_PATH}${SHELL_HOME}/gen-py:${SHELL_HOME}/lib:${PYTHONPATH}" \exec python ${SHELL_HOME}/impala_shell.py "$@"因為python默認是3.x版本,把 python修改成python2 ,重新運行,ok
[root@xxx bin]# impala-shell Starting Impala Shell without Kerberos authentication Error connecting: TTransportException, TSocket read 0 bytes Kerberos ticket found in the credentials cache, retrying the connection with a secure transport. Connected to hostname.zh:21000 Server version: impalad version 2.10.0-cdh5.13.0 RELEASE (build 2511805f1eaa991df1460276c7e9f19d819cd4e4) *********************************************************************************** Welcome to the Impala shell. (Impala Shell v2.10.0-cdh5.13.0 (2511805) built on Wed Oct 4 10:55:37 PDT 2017)To see a summary of a query's progress that updates in real-time, run 'set LIVE_PROGRESS=1;'. *********************************************************************************** [hostname.zh:21000] > show tables; Query: show tables +------+ | name | +------+ | test | +------+ Fetched 1 row(s) in 0.03s [hostname.zh:21000] >?
?
總結
以上是生活随笔為你收集整理的Impala-shell 启动异常 - Python版本为3.x 启动脚本为2.x的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c++阻塞队列
- 下一篇: 别说“我已经很努力了”