栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

Spark查询Hive表报failed to save roles to cache file

Spark查询Hive表报failed to save roles to cache file

问题描述:

使用Spark Sql以yarn client模式读取hive表时报错:

failed to save roles to cache file '/opt/bigdata/xxx/xxx/xxx/sparkSql_Hive_roles.json'

org.apache.ranger.plugin.util.RangerRolesProvider.saveToCache(RangerRolesProvider.java:312)

java.io.FileNotFoundException:/opt/bigdata/xxx/xxx/xxx/sparkSql_Hive_roles.json (No such file or directory)

.....

failed to save policies to cache file '/opt/bigdata/xxx/xxx/xxx/sparkSql_Hive.json'

Caused by: java.io.IOException: Unable to create range policy cache directory at /opt/bigdata/xxx/xxx/xxx/sparkSql_Hive_roles.json

解决方法:

driver运行的机器上并不存在报错的目录路径,手动创建并赋权限解决。

但是如果使用yarn cluster模式运行就要保证所有的NodeManager节点上都存在相应的目录路径,最好设置ranger.plugin.hive.policy.cache.dir值为一个相对路径比如:

        ranger.plugin.hive.policy.cache.dir

        policycache

这个配置项可能出现在ranger-hive-security.xml或者ranger-spark-security.xml文件里

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/630413.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号