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)

相关推荐
houzhizhen2 小时前
Hive PredicatePushDown 谓词下推规则的计算逻辑
hive
.又是新的一天.12 小时前
02_Servlet
hive·hadoop·servlet
wuli玉shell12 小时前
Bitmap原理及Hive去重方式对比
数据仓库·hive·hadoop
尘客.1 天前
DataX从Mysql导数据到Hive分区表案例
数据库·hive·mysql
钊兵2 天前
hivesql是什么数据库?
大数据·hive
IvanCodes3 天前
九、HQL DQL七大查询子句
大数据·数据库·hive
火龙谷4 天前
【hadoop】sqoop案例 hive->mysql
hive·hadoop·sqoop
IvanCodes5 天前
六、Hive 分桶
大数据·hive
IvanCodes5 天前
七、深入 Hive DDL:管理表、分区与洞察元数据
数据仓库·hive·hadoop
若兰幽竹5 天前
【HBase整合Hive】HBase-1.4.8整合Hive-2.3.3过程
数据库·hive·hbase