Hive运行报错
作者:Zhan-bin
日期:2018-07-22
Hive运行报错解决
刚安装完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
at org.apache.Hadoop.hive.ql.session.SessionState.start(SessionState.java:444)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:672)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:616)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
Caused by: 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:148)
at org.apache.hadoop.fs.Path.
at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:487)
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:430)
… 7 more
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:1804)
at java.net.URI.
at org.apache.hadoop.fs.Path.initialize(Path.java:145)
… 10 more
解决:
查看hive-site.xml配置,会看到配置值含有”system:java.io.tmpdir”的配置项
2.新建文件夹在hive目录下新建一个tmp目录
3.将含有”system:java.io.tmpdir”的配置项的值修改为如下地址
把文件里全部的${system:java.io.tmpdir}改成:/home/hadoop/hive/tmp