报错信息如下: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.(Path.java:126)
at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:487)
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:430)
解决方法
编辑配置hive文件hive-site.xml#如下命令将"${system:Java.io.tmpdir}"字段全部替换成"/hive/tmp"
sed -i 's#${system:Java.io.tmpdir}#/hive/tmp#g' hive-site.xml
或者将包含上述字段在值对中的全部改为上述的目录路径/hive/tmp:
例如下面的一段配置:
hive.querylog.location
${system:java.io.tmpdir}/${system:user.name}
Location of Hive run time structured log file
改为:
hive.querylog.location
/hive/tmp
Location of Hive run time structured log file
注:替换掉hive-site.xml中所有出现上述字段的值才行。
最后重新启动hive即可。
本文由 gjc159357 创作,采用 知识共享署名4.0 国际许可协议进行许可
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名
最后编辑时间为: Apr 16, 2018 at 02:10 am