Hadoop 在配置单元中授予权限
我正在尝试使用Hortonworks Sandbox HDP2.2作为一个节点系统在Hive14.0上设置授予权限。这个问题类似于三月的未回答问题: 我遵循了的配置步骤 登录到hive shell(使用root进行ssh)后,我尝试: 失败:执行错误,从org.apache.hadoop.hive.ql.exec.ddlstask返回代码1。未能检索根用户的角色:在此配置中禁用远程元存储的元存储授权api调用 如果我对另一个使用色调/蜂蜡的用户尝试相同的方法,则查询完成。如果我这样做Hadoop 在配置单元中授予权限,hadoop,hive,hortonworks-data-platform,metastore,Hadoop,Hive,Hortonworks Data Platform,Metastore,我正在尝试使用Hortonworks Sandbox HDP2.2作为一个节点系统在Hive14.0上设置授予权限。这个问题类似于三月的未回答问题: 我遵循了的配置步骤 登录到hive shell(使用root进行ssh)后,我尝试: 失败:执行错误,从org.apache.hadoop.hive.ql.exec.ddlstask返回代码1。未能检索根用户的角色:在此配置中禁用远程元存储的元存储授权api调用 如果我对另一个使用色调/蜂蜡的用户尝试相同的方法,则查询完成。如果我这样做 SHOW
SHOW ROLES;
我收到此错误,没有任何日志详细信息:
预期状态已完成,但发现错误
我的设置如下(使用blanc制作的标签在此处显示)
- hive site.xml(在hive wiki链接中列出的那些)
hive.server2.enable.doAs 假的 hive.users.in.admin.role 色调,蜂巢 hive.security.metastore.authorization.manager org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider,org.apache.hadoop.hive.ql.security.authorization.MetaStoreAuthzAPIAuthorizerEmbedOnly hive.security.authorization.manager org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdConfOnlyAuthorizerFactory
- hiveserver2 site.xml(所有设置)
hive.security.authorization.enabled 真的 hive.security.authorization.manager org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory 配置单元.security.authenticator.manager org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator hive.metastore.uris '' hive.conf.restricted.list 配置单元.security.authorization.enabled,配置单元.security.authorization.manager,配置单元.security.authenticator.manager
[Edit3]错误消息会传到每个用户,不仅仅是root用户(您可以在错误消息中看到)。如果我尝试使用管理员角色(hive site.xml)如“hive”的用户,我会遇到相同的错误。能够使其可运行- 以下是要点:
- 您应该使用Ambari更改所有设置
- 不更改hive.metastore.uris-setting
- 手动更改hive.security.authorization.manager的hiveserver2-site.xml属性
- 将hiveserver2-site.xml复制到/etc/hive/conf.server/
- 重新启动hiveserver2
- 对SQL权限仅使用直线
SHOW ROLES;
<property>
<name>hive.server2.enable.doAs</name>
<value>false</value>
</property>
<property>
<name>hive.users.in.admin.role</name>
<value>hue,hive</value>
</property>
<property>
<name>hive.security.metastore.authorization.manager</name>
<value>org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider,org.apache.hadoop.hive.ql.security.authorization.MetaStoreAuthzAPIAuthorizerEmbedOnly</value>
</property>
<property>
<name>hive.security.authorization.manager</name>
<value>org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdConfOnlyAuthorizerFactory</value>
</property>
<property>
<name>hive.security.authorization.enabled</name>
<value>true</value>
</property>
<property>
<name>hive.security.authorization.manager</name>
<value>org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory</value>
</property>
<property>
<name>hive.security.authenticator.manager</name>
<value>org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator</value>
</property>
<property>
<name>hive.metastore.uris</name>
<value>''</value>
</property>
<property>
<name>hive.conf.restricted.list</name>
<value>hive.security.authorization.enabled,hive.security.authorization.manager,hive.security.authenticator.manager</value>
</property>