原创

Hive启动报错Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D

Hive启动报错.png

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:263)
    at org.apache.hadoop.fs.Path.<init>(Path.java:221)
    at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:663)
    at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:586)
    at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:553)
    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:323)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
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:260)
    ... 12 more

解决办法

搜索system:java.io.tmpdir,将搜索出来的结果全部替换。(前面从6 ~ 9配置了,这里不会报错)

Hive启动报错-解决办法-1.0.png

搜索system:java.io.tmpdir,将搜索出来的结果全部替换,如下:

  <!-- 6.修改为/software/hive/iotmp -->
  <property>
    <name>hive.exec.local.scratchdir</name>
    <value>/software/hive/iotmp</value>
    <description>Local scratch space for Hive jobs</description>
  </property>
  <!-- 7.修改为/software/hive/iotmp -->
  <property>
    <name>hive.downloaded.resources.dir</name>
    <value>/software/hive/iotmp</value>
    <description>Temporary local directory for added resources in the remote file system.</description>
  </property>
  <!-- 8.修改为/software/hive/iotmp -->
  <property>
    <name>hive.querylog.location</name>
    <value>/software/hive/iotmp</value>
    <description>Location of Hive run time structured log file</description>
  </property>
  <!-- 9.修改为/software/hive/iotmp -->
  <property>
    <name>hive.server2.logging.operation.log.location</name>
    <value>/software/hive/iotmp</value>
    <description>Top level directory where operation logs are stored if logging functionality is enabled</description>
  </property>

修改之后,启动成功:

Hive启动成功.png

↓↓↓ 打开微信关注我的微信公众号 ↓↓↓

会打篮球的程序猿

领取精品免费学习资料哦~
正文到此结束
本文目录