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)

相关推荐
zgl_200537791 天前
ZGLanguage 解析SQL数据血缘 之 Python提取SQL表级血缘树信息
大数据·数据库·数据仓库·hive·hadoop·python·sql
Justice Young2 天前
Hive第四章:HIVE Operators and Functions
大数据·数据仓库·hive·hadoop
LF3_2 天前
hive,Relative path in absolute URI: ${system:user.name%7D 解决
数据仓库·hive·hadoop
德彪稳坐倒骑驴2 天前
Hive SQL常遗忘的命令
hive·hadoop·sql
Justice Young2 天前
Hive第六章:Hive Optimization and Miscellaneous
数据仓库·hive·hadoop
Justice Young2 天前
Hive第五章:Integeration with HBase
大数据·数据仓库·hive·hbase
Justice Young2 天前
Hive第三章:HQL的使用
大数据·数据仓库·hive·hadoop
yumgpkpm3 天前
AI评判:信创替代对Cloudera CDH CDP Hadoop大数据平台有何影响?
大数据·hive·oracle·flink·kafka·hbase·cloudera
yumgpkpm3 天前
Cloudera CDH5、CDH6、CDP7现状及替代方案
数据库·人工智能·hive·hadoop·elasticsearch·数据挖掘·kafka
心止水j4 天前
hive问题
数据仓库·hive·hadoop