安装cdh5.0执行impala-shell命令报impala_shell.py文件找不到

一 问题描述 python

    采用package包方式安装cdh时, 安装程序会将impala-shell目录下的全部文件复制到/usr/lib/impala-shell下面, 但采用parcels安装时,安装程序并不会建立/usr/lib/impala-shell目录,也不会复制相应的文件, 因此安装好CDH后,执行impala-shell会报impala_shell.py找不到. shell

[root@kthdpp01 hadoop]# impala-shell 
ls: 没法访问/usr/lib/impala-shell/ext-py/*.egg: 没有那个文件或目录
python: can't open file '/usr/lib/impala-shell/impala_shell.py': [Errno 2] No such file or directory
oop

二 解决方案 ui

    mkdir -p /usr/lib/impala-shell/ spa

    /opt/cloudera/parcels/CDH/lib/impala-shell hadoop

    cp -r * /usr/lib/impala-shell/ it

运行impala-shell命令,能够正常的执行查询 io

[root@kthdpp01 impala-shell]# impala-shell 
Starting Impala Shell without Kerberos authentication
Connected to kthdpp01.kt:21000
Server version: impalad version 1.3.1-cdh5 RELEASE (build 2cd2029d7e7871fdaa3b214d547a378205146f4c)
Welcome to the Impala shell. Press TAB twice to see a list of available commands.


Copyright (c) 2012 Cloudera, Inc. All rights reserved.


(Shell build version: Impala Shell v1.3.1-cdh5 (2cd2029) built on Mon May  5 20:45:59 PDT 2014)
[kthdpp01.kt:21000] > select * from tbtest3;
Query: select * from tbtest3
+----+------+
| id | name |
+----+------+
| 1  | NULL |
| 2  | NULL |
| 3  | NULL |
| 4  | NULL |
| 5  | NULL |
+----+------+
Returned 5 row(s) in 0.30s test

相关文章
相关标签/搜索