1.问题:spark往Hive表里写数据时,出现hdfs权限安全问题
2.原因:本地用户没有权限
2.解决方案:修改hdfs配置文件
进入Hadoop安装目录下修改 /etc/hadoop/hdfs-site.xml,
添加如下配置信息
<property>
<name>dfs.permissions</name>
<value>false</value>
<description>
If "true", enable permission checking in HDFS.
If "false", permission checking is turned off,
but all other behavior is unchanged.
Switching from one parameter value to the other does not change the mode,
owner or group of files or directories.
</description>
</property>
然后重启hdfs集群,重启Hive相关服务,重新运行即可
本文讲述了在Spark将数据写入Hive表时遇到的HDFS权限问题,由于本地用户缺少权限,解决方案是修改Hadoop的hdfs-site.xml配置文件,禁用HDFS权限检查,重启集群和Hive服务后问题得以解决。
5352

被折叠的 条评论
为什么被折叠?



