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

一笑奈何 提交于 2019-12-04 06:55:03

一 问题描述

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

[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

二 解决方案

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

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

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

运行impala-shell命令,可以正常的执行查询

[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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!