启动impala-shell时报错
[root@106 impala-shell]# impala-shell
File "/usr/lib/impala-shell/impala_shell.py", line 208
print '\tNo options available.'
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('\tNo options available.')?
此问题是由python版本导致的,修复方法如下:
[root@106 impala-shell]# whereis impala-shell
impala-shell: /usr/bin/impala-shell /usr/lib/impala-shell
[root@106 impala-shell]# vi /usr/bin/impala-shell
PYTHONPATH="${EGG_PATH}${SHELL_HOME}/gen-py:${SHELL_HOME}/lib:${PYTHONPATH}" \
exec python ${SHELL_HOME}/impala_shell.py "$@"
python修改成python2,修改启动impala-shell的python版本。
[root@106 impala-shell]# impala-shell
Starting Impala Shell without Kerberos authentication
Connected to everdc106:21000
Server version: impalad version 2.5.0-cdh5.7.0 RELEASE (build ad3f5adabedf56fe6bd9eea39147c067cc552703)
***********************************************************************************
Welcome to the Impala shell. Copyright (c) 2015 Cloudera, Inc. All rights reserved.
(Impala Shell v2.5.0-cdh5.7.0 (ad3f5ad) built on Wed Mar 23 11:33:33 PDT 2016)
Press TAB twice to see a list of available commands.
***********************************************************************************
[106:21000] >