oozie中通过shell执行impala,脚本如下:

$ cat test_impala.sh
#!/bin/sh
/usr/bin/kinit -kt /tmp/impala.keytab impala/server04
/usr/bin/impala-shell -i server04:21000 -q 'show databases'

直接执行shell脚本正常,在oozie中执行报错:

Traceback (most recent call last):
File "/usr/lib/impala-shell/impala_shell.py", line 38, in <module>
from impala_client import (ImpalaClient, DisconnectedException, QueryStateException,
File "/usr/lib/impala-shell/lib/impala_client.py", line 20, in <module>
import sasl
File "/usr/lib/impala-shell/ext-py/sasl-0.1.1-py2.7-linux-x86_64.egg/sasl/__init__.py", line 1, in <module> File "/usr/lib/impala-shell/ext-py/sasl-0.1.1-py2.7-linux-x86_64.egg/sasl/saslwrapper.py", line 7, in <module>
File "/usr/lib/impala-shell/ext-py/sasl-0.1.1-py2.7-linux-x86_64.egg/_saslwrapper.py", line 7, in <module>
File "/usr/lib/impala-shell/ext-py/sasl-0.1.1-py2.7-linux-x86_64.egg/_saslwrapper.py", line 4, in __bootstrap__
File "/usr/lib/impala-shell/lib/pkg_resources.py", line 874, in resource_filename
self, resource_name
File "/usr/lib/impala-shell/lib/pkg_resources.py", line 1349, in get_resource_filename
self._extract_resource(manager, self._eager_to_zip(name))
File "/usr/lib/impala-shell/lib/pkg_resources.py", line 1375, in _extract_resource
self.egg_name, self._parts(zip_path)
File "/usr/lib/impala-shell/lib/pkg_resources.py", line 954, in get_cache_path
self.extraction_error()
File "/usr/lib/impala-shell/lib/pkg_resources.py", line 920, in extraction_error
raise err
pkg_resources.ExtractionError: Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg
cache: [Errno 13] Permission denied: '/home/.python-eggs' The Python egg cache directory is currently set to: /home/.python-eggs Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory. Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.ShellMain], exit code [1]

按照提示修改PYTHON_EGG_CACHE即可

$ cat test_impala.sh
#!/bin/sh
export PYTHON_EGG_CACHE=/tmp/.python-eggs
/usr/bin/kinit -kt /tmp/impala.keytab impala/server04
/usr/bin/impala-shell -i server04:21000 -q 'show databases'

另外还可以通过beeline连接,则没有python的问题,

详见:https://www.cnblogs.com/barneywill/p/10296502.html

最新文章

  1. win上搭建react-native android环境
  2. Centos 7 通过挂载系统光盘搭建本地yum仓库的方法
  3. 详尽介绍FireFox about:config
  4. object
  5. hdu-5597 GTW likes function(欧拉函数+找规律)
  6. Azure + vsftpd + ubntu14 + 虚拟用户 遇到的问题:从网上摘抄
  7. DataGridView 的cell赋值没有线程间访问的限制吗?
  8. 一个奇怪的编码 big5-hkscs
  9. 湖南生第八届大学生程序设计大赛原题 C-Updating a Dictionary(UVA12504 - Updating a Dictionary)
  10. 使用ARM和VMSS创建自动扩展的web集群
  11. 列求key出现的频率
  12. Java IO学习笔记一
  13. 原创:工作指派问题解决方案---模拟退火算法C实现
  14. 《HelloGitHub》第 23 期
  15. this的四种用法
  16. 905. Sort Array By Parity
  17. node调试工具--nodemon
  18. MySQL设置只读模式
  19. JavaScript高级编程——Array数组迭代(every()、filter()、foreach()、map()、some(),归并(reduce() 和reduceRight() ))
  20. 【CF802C】Heidi and Library (hard) 费用流

热门文章

  1. centos7之zabbix的web检测
  2. 浅谈kafka streams
  3. leanote 信息栏显示笔记本和笔记类型
  4. leanote折腾指南
  5. docker内安装php缺少的扩展mysql.so和mysqli.so
  6. python@wraps实现原理
  7. 3-ftp搭建成功,服务器能访问,外网无法连接和访问
  8. easyUI文本框获得焦点,失去焦点
  9. codeforces-1142 (div1)
  10. 微信小程序 TLS 版本必须大于等于1.2问题解决