Error applying authorization policy on hive configuration: Couldn't create directory ${system:java.io.tmpdir}\${hive.session.id}_resources

元气小坏坏 提交于 2019-12-10 10:13:12

问题


I run Hadoop 3.0.0-alpha1 on windows and added Hive 2.1.1 to it. When I try to open the hive beeline with the hive command I get an error:

Error applying authorization policy on hive configuration: 
Couldn't create directory ${system:java.io.tmpdir}\${hive.session.id}_resources

Whats wrong?

I run mysql as metastore for Hive and added the required files in HDFS:

hadoop fs -mkdir /user/hive
hadoop fs -mkdir /user/hive/warehouse
hadoop fs -mkdir /tmp

After that I changed the permissions:

hadoop fs -chmod 777 /user/hive
hadoop fs -chmod 777 /user/hive/warehouse
hadoop fs -chmod 777 /tmp

YARN and DFS deamons are running as well as mysql, the mysql jdbc-driver is known to hadoop as well as to hive.


回答1:


replace this particular configuration in your hive-site.xml

<value>${system:java.io.tmpdir}/${hive.session.id}_resources</value>

replace with

<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> 


来源:https://stackoverflow.com/questions/42690210/error-applying-authorization-policy-on-hive-configuration-couldnt-create-direc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!