最近在Linux上试用Impala,遇到了这个问题,记录下来能帮助到到家就最好了!
1.启动Impala
- 进入
service
(存放impald、catalogs、statestored)的目录,通过以下命令启动
-service impala-state-store
-start service impala-catalog
-start service impala-server start
- 查看启动状态:
ps -ef | grep impala
2.启动impala-shell脚本
bin/impala-shell.sh
,但是出现以下报错:
Opened TCP connection to localhost:21000
Socket error 32:[Errno 32] Broken pipe
******************************************
Welcome to the Impala shell.
(Impala shell vx.x.x-RELEASE)
******************************************
[Not Connected]>
尝试:
官网说这是在没有连接的情况下启动Impala shell,找到正在运行impalad守护程序的主机名。
如果该impalad并非使用默认端口(21000)还要知名端口号。使用如下命令:
[Not Connected]> connect impalad-host
impalad-host替换成运行impala的主机名。
但还是出现以下报错:
Connection lost,reconnecting...
Error connecting:TTransportException,could not connect to xx.xx.xx.xx:port
解决办法:
impala-shell -l -u username --auth_creds_ok_in_clear
连接成功!