User: zhangflink is not allowed to impersonate zhangflink

使用hive2连接进行添加数据是报错:

08S01\]\[1\] Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. User: zhangflink is not allowed to impersonate zhangflink ![在这里插入图片描述](https://file.jishuzhan.net/article/1733840514161053698/be421c1771c54b7c65cb715699fce4e8.webp) ![在这里插入图片描述](https://file.jishuzhan.net/article/1733840514161053698/a21f16581e6b2d4c4ad40491d956790c.webp) 有些文章说需要修改代理,我的配置一直就是这也照样不行。后来发现是没有添加 hive.server2.enable.doAs配置导致。 解决方法: 在hive目录下的conf文件下的hive-site.xml文件,添加配置 ```bash hive.server2.enable.doAs false ``` hive.server2.enable.doAs设置成false则,yarn作业获取到的hiveserver2用户都为hive用户。设置成true则为实际的用户名。 添加配置后重新启动: 启动元数据 ```bash [zhangflink@flinkv1 hive]$ nohup bin/hive --service metastore > hiveMetastore.log 2>&1 & ``` 启动hive2服务 ```bash [zhangflink@flinkv1 hive]$ nohup bin/hive --service hiveserver2 > hive.log 2>&1 & ``` 重新添加数据,完美解决 ![在这里插入图片描述](https://file.jishuzhan.net/article/1733840514161053698/9470535940d25379467983bdede587e7.webp)

相关推荐
王的宝库12 小时前
MapReduce / Hive / Pig :从底层批处理到 SQL/脚本落地
hive·hadoop·sql·mapreduce
升职佳兴13 小时前
告别 nohup:Hive Metastore 交给 systemd 托管的完整步骤
数据仓库·hive·hadoop
网络工程小王1 天前
【大数据技术详解】——HIVE技术(学习笔记)
大数据·hive·hadoop
泰克教育官方账号1 天前
泰涨知识 | 【编程操作详解】Spark读写Hive
大数据·hive·spark
十月南城14 天前
数据湖技术对比——Iceberg、Hudi、Delta的表格格式与维护策略
大数据·数据库·数据仓库·hive·hadoop·spark
王九思14 天前
Hive Thrift Server 介绍
数据仓库·hive·hadoop
Asher050914 天前
Hive核心知识:从基础到实战全解析
数据仓库·hive·hadoop
xhaoDream14 天前
Hive3.1.3 配置 Tez 引擎
大数据·hive·tez
一号IT男17 天前
Hive中GROUPING SETS功能详解
数据仓库·hive·hadoop
500佰17 天前
Hive常见故障多案例FAQ宝典 --项目总结(宝典一)
大数据·linux·数据仓库·hive·hadoop·云计算·运维开发