datagrip-操作hive 进行联合查询失败问题 可以试一下

致力于解决:hdfs: org.apache.hadoop.security.AccessControlException(Permission denied)

问题描述:我在DataGrip操作hive 进行联合查询时,出现如下错误

Job Submission failed with exception ‘org.apache.hadoop.security.AccessControlException(Permission denied: user=anonymous, access=EXECUTE, inode=”/tmp”:root:supergroup:drwx——

错误信息 –> 指向hdfs

对比测试发现:

在linux 上直接操作 hive 第一代客户端 : 输入命令 : hive 回车,执行该条hql,发现毫无问题

==> 综合推断:hdfs 权限问题:

描述:

问题根源:原来不同用户提交的作业是在 /tmp下,他在集群上的权限必须是:700

解决方法:

第一种:在可以更改集群配置文件下:

hdfs-site中加入,将hdfs的用户认证关闭

  1. <property>
  2. <name>dfs.permissions.enabled</name>
  3. <value>true</value>
  4. <description>
  5. If “true”, enable permission checking in HDFS.
  6. If “false”, permission checking is turned off,
  7. but all other behavior is unchanged.
  8. Switching from one parameter value to the other does not change the mode,
  9. owner or group of files or directories.
  10. </description>
  11. </property>

第二种:

将:export HADOOP_USER_NAME = hdfs

添加到 ~/.bash_profile 中,然后执行

source  ~/.bash_profile

 

 

第三种:

将System.setProperty(“HADOOP_USER_NAME”,“hdfs”);

添加到代码的main方法首部,

该语句的意思是修改代码的系统变量HADOOP_USER_NAME的内容为hdfs
———————

 

原文链接:(97条消息) 解决:hdfs: org.apache.hadoop.security.AccessControlException(Permission denied)_weixin_33736832的博客-CSDN博客

© 版权声明
THE END
喜欢就支持以下吧
点赞0 分享
图片正在生成中,请稍后...