【问题标题】:grant permissions in hive does not work on hdp2.2hive 中的授予权限不适用于 hdp2.2
【发布时间】:2015-05-26 06:00:06
【问题描述】:

我正在 CentOS 6.5 上尝试使用 Ambari 设置的 HDP2.2 集群,但在运行 Hive GRANT 查询时遇到问题。例如,查询

grant select on Tbl1 to user root;

给了我一个看起来像这样的异常

FAILED:执行错误,返回代码 1 从 org.apache.hadoop.hive.ql.exec.DDLTask。未能检索到角色 hdfs:远程 Metastore 的 Metastore Authorization api 调用是 在此配置中禁用。

这里发生了什么,你能解释一下'retrieve roles for hdfs'的含义吗?那是“hdfs”系统用户还是某些特定的 hadoop 用户?

从我一直在阅读的内容来看,问题似乎出在一些配置单元设置上。有没有办法以某种方式关闭安全性或使用 hive-site.xml 以正确的方式对其进行调整?

【问题讨论】:

    标签: hive hortonworks-data-platform metastore ambari


    【解决方案1】:

    以下是您的 hive-site.xml 中的设置?

    hive.security.metastore.authorization.manager org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider,org.apache.hadoop.hive.ql.security.authorization.MetaStoreAuthzAPIAuthorizerEmbedOnly

    这将限制任何通过 beeline/hive-server2 接口的 Grant/Revoke 语句。

    设置“MetaStoreAuthzAPIAuthorizerEmbedOnly”是对“StorageBasedAuthorizationProvider”的补充,其唯一目的是通过 hive-cli 禁用授权/撤销。 要完全使用 SQL 授权,此设置为提供基于 SQL 的授权提供单点控制。如果删除此设置,Hive-CLI 中的任何人都可以设置他/她自己的管理员并绕过基于 SQL 的权限。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-06
      • 2021-07-17
      • 2013-12-24
      • 1970-01-01
      • 2016-08-24
      • 2015-01-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多