hive启动时遇到以下错误:
Exception in thread “main”java.lang.RuntimeException:
java.lang.IllegalArgumentException:java.net.URISyntaxException:
Relative path in absolute
URI:{system:java.io.tmpdir%7D/%7Bsystem:user.name%7D
解决办法:
在hive下创建临时IO的tmp文件夹。然后将路径配置到hive-site.xml的下列参数中
<property>
<name>hive.querylog.location</name>
<value>/usr/local/src/hive/iotmp</value>
<description>Location of Hive run time structured log file</description>
</property>
<property>
<name>hive.exec.local.scratchdir</name>
<value>/usr/local/src/hive/iotmp</value>
<description>Local scratch space for Hive jobs</description>
</property>
<property>
<name>hive.downloaded.resources.dir</name>
<value>/usr/local/src/hive/iotmp</value>
<description>Temporary local directory for added resources in the remote file system.</description>
</property>
保存,重启hive即可。
[root@master ~]# hive
Logging initialized using configuration in jar:file:/usr/local/src/hive/lib/hive-common-2.0.0.jar!/hive-log4j2.properties
Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
hive> show databases;
OK
default
Time taken: 1.26 seconds, Fetched: 1 row(s)
hive>