hive 启动抛出java.net.URISyntaxException

日志部分内容:

  

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:254)
    at org.apache.hadoop.fs.Path.<init>(Path.java:212)
    at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:659)
    at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:582)
    at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:549)
    at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:750)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:686)
    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:234)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
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.<init>(URI.java:745)
    at org.apache.hadoop.fs.Path.initialize(Path.java:251)

解决:

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

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

posted @ 2018-03-02 15:22  猴子1  阅读(1226)  评论(0编辑  收藏  举报