无法在配置单元 server2 上模拟

cant impersonate on hive server2

我正在尝试通过 JDBC 连接器连接到配置单元服务器 2,但出现错误:

'user x cant impersonate y'

我将这些属性添加到我的核心-site.xml 文件中:

 <property>
   <name>hadoop.proxyuser.hive.hosts</name>
   <value>*</value>
 </property>

 <property>
   <name>hadoop.proxyuser.hive.groups</name>
   <value>*</value>
 </property>

此外,在 hive-site.xml 我有:

  <property>
    <name>hive.server2.enable.doAs</name>
    <value>true</value>
    <description>
    Setting this property to true will have HiveServer2 execute
    Hive operations as the user making the calls to it.
    </description>
 </property>

我的身份验证设置为 none 并且我以匿名身份连接。自从更改配置文件以及 运行:

后,我已经重新启动了我的集群
hadoop fs -chmod g+w /user/hive/warehouse
hadoop fs -chmod g+w /tmp

谁能告诉我为什么我仍然收到错误消息?

如果您尝试以名为 anonymous 的用户身份连接,属性应该是

<property>
     <name>hadoop.proxyuser.anonymous.hosts</name> 
     <value>*</value> 
</property> 
<property>
     <name>hadoop.proxyuser.anonymous.groups</name>
     <value>*</value>
</property>