我在Windows上运行Hadoop 3.0.0-alpha1
并向其添加了Hive 2.1.1
。当我尝试使用hive
命令打开蜂巢直线时,我收到错误:
Error applying authorization policy on hive configuration:
Couldn't create directory ${system:java.io.tmpdir}\${hive.session.id}_resources
怎么了?
我为Hive运行mysql
作为Metastore,并在HDFS中添加了所需的文件:
hadoop fs -mkdir /user/hive
hadoop fs -mkdir /user/hive/warehouse
hadoop fs -mkdir /tmp
之后我改变了权限:
hadoop fs -chmod 777 /user/hive
hadoop fs -chmod 777 /user/hive/warehouse
hadoop fs -chmod 777 /tmp
YARN
和DFS
deamons和mysql
一样运行,mysql jdbc-driver已知为hadoop以及hive。
答案 0 :(得分:1)
在您的 hive-site.xml
中替换此特定配置<value>${system:java.io.tmpdir}/${hive.session.id}_resources</value>
替换为
<property>
<name>hive.downloaded.resources.dir</name>
<!--
<value>${system:java.io.tmpdir}/${hive.session.id}_resources</value>
-->
<value>/home/hduser/hive/tmp/${hive.session.id}_resources</value>
<description>Temporary local directory for added resources in the remote file system.</description>
</property>