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

  1. 云栖社区>
  2. 博客>
  3. 正文

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

cloudcoder 2016-05-13 13:56:36 浏览2893
展开阅读全文

一 问题描述

    采用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

网友评论

登录后评论
0/500
评论
cloudcoder
+ 关注