hive/lib/hive-common-2.2.0.jar!/hive-log4j2.properties Async: true

今天安装hive的时候报这个错,用的是hive2.2.0的版本,花了两个小时才解决。

Logging initialized using configuration in jar:file:/opt/software/hive/lib/hive-common-2.2.0.jar!/hive-log4j2.properties Async: true
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.(Path.java:212)
    at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:667)
    at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:586)
    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:497)
    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.(URI.java:745)
    at org.apache.hadoop.fs.Path.initialize(Path.java:251)
    ... 12 more

仔细看日志才发现

${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D

在hive.site.xml 中找到system:java.io.tmpdir


    hive.exec.local.scratchdir
    ${system:java.io.tmpdir}/${system:user.name}
    Local scratch space for Hive jobs
 

然后替换成

hive.exec.local.scratchdir
 /opt/hive/tmp/root

 Local scratch space for Hive jobs


重新启动hive服务ok。







你可能感兴趣的:(Hive)