【原创】大叔经验分享(48)oozie中通过shell执行impala
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
【原创】大叔经验分享(48)oozie中通过shell执行impala的更多相关文章
- 【原创】经验分享:一个小小emoji尽然牵扯出来这么多东西?
前言 之前也分享过很多工作中踩坑的经验: 一个线上问题的思考:Eureka注册中心集群如何实现客户端请求负载及故障转移? [原创]经验分享:一个Content-Length引发的血案(almost.. ...
- 【原创】大叔经验分享(18)hive2.0以后通过beeline执行sql没有进度信息
一 问题 在hive1.2中使用hive或者beeline执行sql都有进度信息,但是升级到hive2.0以后,只有hive执行sql还有进度信息,beeline执行sql完全silence,在等待结 ...
- 【原创】大叔经验分享(49)hue访问hdfs报错/hue访问oozie editor页面卡住
hue中使用hue用户(hue admin)访问hdfs报错: Cannot access: /. Note: you are a Hue admin but not a HDFS superuser ...
- 【原创】大叔经验分享(6)Oozie如何查看提交到Yarn上的任务日志
通过oozie job id可以查看流程详细信息,命令如下: oozie job -info 0012077-180830142722522-oozie-hado-W 流程详细信息如下: Job ID ...
- 【原创】大叔经验分享(5)oozie提交spark任务如何添加依赖
spark任务添加依赖的方式: 1 如果是local方式运行,可以通过--jars来添加依赖: 2 如果是yarn方式运行,可以通过spark.yarn.jars来添加依赖: 这两种方式在oozie上 ...
- 【原创】大叔经验分享(21)yarn中查看每个应用实时占用的内存和cpu资源
在yarn中的application详情页面 http://resourcemanager/cluster/app/$applicationId 或者通过application命令 yarn appl ...
- 【原创】大叔经验分享(84)spark sql中设置hive.exec.max.dynamic.partitions无效
spark 2.4 spark sql中执行 set hive.exec.max.dynamic.partitions=10000; 后再执行sql依然会报错: org.apache.hadoop.h ...
- 【原创】大叔经验分享(71)docker容器中使用jvm工具
java应用中经常需要用到jvm工具来进行一些操作,如果java应用部署在docker容器中,如何使用jvm工具? 首先要看使用的docker镜像, 比如常用的openjdk镜像分为jdk和jre,只 ...
- 【原创】大叔经验分享(7)创建hive表时格式如何选择
常用格式 textfile 需要定义分隔符,占用空间大,读写效率最低,非常容易发生冲突(分隔符)的一种格式,基本上只有需要导入数据的时候才会使用,比如导入csv文件: ROW FORMAT DELIM ...
随机推荐
- CentOS系统版本的查看方法
CentOS系统版本的查看方法 查看操作系统版本 1 [root@aliyun ~]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noa ...
- git submoudle提交
进入到各个submoudle文件夹 git status 查看所在branch和文件修改状态 git add [files]; git commit "" git pull ori ...
- Flask--特殊装饰器, CBV, 三方组件
一. Flask中的特殊装饰器 before_request # before_request 是在视图函数执行之前执行的 @app.before_request def before(): prin ...
- python_正则表达式随笔
webpage_regex = re.search(r'span_ed7[\s\S]*', dd) [\s\S]* 匹配多行,转义字符 webpage_regex = re.compile('< ...
- C/C++音视频库ffmpeg的数据包AVPacket分析
ffmpeg下载地址 http://www.ffmpeg.club/ AVPacket是ffmpeg用来存放编码后的视频帧数据,我们来分析一下这个结构体,先贴出ffmpeg3.2中AVPacket声明 ...
- scrollbar样式设置
转载:https://segmentfault.com/a/1190000012800450?utm_source=tag-newest author:specialCoder 一 前言 在CSS 中 ...
- ctx中的body无法找到
学习koa的时候看到廖雪峰大大的文章 其中有一段写的总是报错找不到name 代码如下 router.get('/', async (ctx, next) => { ctx.response.bo ...
- 自定义的AdBlock过滤规则
自定义的AdBlock过滤规则 # 屏蔽百度首页的广告流 www.baidu.com##DIV[id="u1"] www.baidu.com##DIV[id="qrcod ...
- foreach 中获取索引index的方法
一样,很少用到,记下来先 主要代码: foreach (var item in arr) { int index = arr.indexOf(item); //index 为索引值 }
- mybatis 插入 含有美元符号($) 字符串 报 java.lang.IndexOutOfBoundsException: No group 2 的问题
一:问题描述: 在springboot-security框架生成BCryptPasswordEncoder()方法生成加密后的密码后,带有$符号,导致新增用户的时候插入不了,报(IndexOutOfB ...