Hive启动时,报错Relative path in absolute URI: ${system:java.io.tmpdir}

一.启动Hadoop后运行Hive时出现如下错误。  

Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D

Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: 
Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D
	at org.apache.hadoop.fs.Path.initialize(Path.java:205)
	at org.apache.hadoop.fs.Path.(Path.java:171)
	at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:644)
	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:563)
	at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:531)
	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705)
	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D
	at java.net.URI.checkPath(URI.java:1823)
	at java.net.URI.(URI.java:745)
	at org.apache.hadoop.fs.Path.initialize(Path.java:202)
	... 12 more
二. 错误分析。


三.错误修改。

修改 hive-site.xml 中所有包含 ${system:Java.io.tmpdir} 字段的 value 即路径(vim下 / 表示搜索,后面跟你的关键词,比如搜索 hello,则为 /hello , 再回车即可),你可以自己新建一个目录来替换它,例如 /home/hive/iotmp . 

我这边把hive-site.xml中所有出现${system:Java.io.tmpdir}的地方都替换成了:

/Users/eleme/Documents/ProgramFiles/apache-software-foundation/apache-hive-2.1.1-bin/iotmp


你可能感兴趣的:(大数据,-,Hive)