Hive学习1_hive配置遇到的问题:Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%

来源:互联网 发布:小白编程网站 编辑:程序博客网 时间:2024/04/29 17:30

遇到的异常详情如下:

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        atorg.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:444)        atorg.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:672)        atorg.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:616)        atsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)        atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        atjava.lang.reflect.Method.invoke(Method.java:606)        atorg.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        atorg.apache.hadoop.fs.Path.initialize(Path.java:148)        atorg.apache.hadoop.fs.Path.<init>(Path.java:126)        atorg.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:487)        atorg.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:430)        ... 7moreCaused by: java.net.URISyntaxException:Relative path in absolute URI:${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D        atjava.net.URI.checkPath(URI.java:1804)        atjava.net.URI.<init>(URI.java:752)        atorg.apache.hadoop.fs.Path.initialize(Path.java:145)        ... 10more

解决方案如下:
1.
查看hive-site.xml配置,会看到配置值含有"system:java.io.tmpdir"的配置项
2.
新建文件夹/home/grid/hive-0.14.0-bin/iotmp
3.将含有"system:java.io.tmpdir"的配置项的值修改为如上地址
启动hive,成功!


启动情况如下:
[grid@yanfh01 bin]$ ./hive
Logging initialized using configuration in jar:file:/home/grid/hive-0.14.0-bin/lib/hive-common-0.14.0.jar!/hive-log4j.properties
hive> 

原文来自:http://blog.csdn.net/zwx19921215/article/details/42776589

0 0