无法在配置单元server2上模拟

j13ufse2  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(328)

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

'user x cant impersonate y'

我将这些属性添加到core-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>

我的身份验证设置为“无”,我以匿名身份连接。自从更改配置文件并运行以下命令后,我已重新启动群集:

hadoop fs -chmod g+w /user/hive/warehouse
hadoop fs -chmod g+w /tmp

有人能告诉我为什么我还是会出错吗?

hts6caw3

hts6caw31#

如果您尝试以用户名连接 anonymous ,属性应为

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

相关问题