在配置单元配置上应用授权策略时出错:无法创建目录$ {system:java.io.tmpdir} \ $ {hive.session.id} _resources [英] Error applying authorization policy on hive configuration: Couldn't create directory ${system:java.io.tmpdir}\${hive.session.id}_resources

查看:839
本文介绍了在配置单元配置上应用授权策略时出错:无法创建目录$ {system:java.io.tmpdir} \ $ {hive.session.id} _resources的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows上运行Hadoop 3.0.0-alpha1,并向其中添加了Hive 2.1.1.当我尝试使用hive命令打开蜂巢蜂线时,出现错误:

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

怎么了?

我将mysql作为Hive的元存储运行,并在HDFS中添加了所需的文件:

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

之后,我更改了权限:

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

YARNDFS守护进程与mysql一样运行,众所周知,mysql jdbc驱动程序既有蜂巢也有蜂巢.

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

推荐答案

将此特定配置替换为您的 hive-site.xml

replace this particular configuration in your 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> 

这篇关于在配置单元配置上应用授权策略时出错:无法创建目录$ {system:java.io.tmpdir} \ $ {hive.session.id} _resources的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆