安裝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

相關文章
相關標籤/搜索