当前位置:
首页 >
Impala-shell 启动异常 - Python版本为3.x 启动脚本为2.x
发布时间:2024/8/23
40
豆豆
生活随笔
收集整理的这篇文章主要介绍了
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++阻塞队列
- 下一篇: txt记录位置 c++,python显示