Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.
hive Caused by: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D오류발생시 조치사항
hiveserver2실행시 /tmp/root/hive.log를 보면 아래와 같은 오류가 발생하는데 다음과 같이 수정한다.
가. hive-site.xml의 다음 항목값을 수정한다.
<name>hive.exec.scratchdir</name>
<value>/tmp/hive-${user.name}</value>
<name>hive.exec.local.scratchdir</name>
<value>/tmp/${user.name}</value>
<name>hive.downloaded.resources.dir</name>
<value>/tmp/${user.name}_resources</value>
<name>hive.scratch.dir.permission</name>
<value>733</value>
나. bin폴더 아래에서 metastore 서비스와 hiveserver2 데몬을 다시 기동한다.
./hive --service metastore &
./hiveserver2 &
------------------------------------오류내용---------------------
2016-06-03T19:58:49,938 WARN [main]: server.HiveServer2 (HiveServer2.java:startHiveServer2(555)) - Error starting HiveServer2 on attempt 3, will retry in 60 seconds
java.lang.RuntimeException: Error applying authorization policy on hive configuration: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D
at org.apache.hive.service.cli.CLIService.init(CLIService.java:112) ~[hive-jdbc-2.0.1-standalone.jar:2.0.1]
at org.apache.hive.service.CompositeService.init(CompositeService.java:59) ~[hive-jdbc-2.0.1-standalone.jar:2.0.1]
at org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:118) ~[hive-jdbc-2.0.1-standalone.jar:2.0.1]
at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:514) [hive-jdbc-2.0.1-standalone.jar:2.0.1]
at org.apache.hive.service.server.HiveServer2.access$700(HiveServer2.java:85) [hive-jdbc-2.0.1-standalone.jar:2.0.1]
at org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:771) [hive-jdbc-2.0.1-standalone.jar:2.0.1]
at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:640) [hive-jdbc-2.0.1-standalone.jar:2.0.1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_66]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_66]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_66]
at org.apache.hadoop.util.RunJar.run(RunJar.java:221) [spark-assembly-1.3.1-hadoop2.6.0.jar:1.3.1]
at org.apache.hadoop.util.RunJar.main(RunJar.java:136) [spark-assembly-1.3.1-hadoop2.6.0.jar:1.3.1]
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:206) ~[spark-assembly-1.3.1-hadoop2.6.0.jar:1.3.1]
at org.apache.hadoop.fs.Path.<init>(Path.java:172) ~[spark-assembly-1.3.1-hadoop2.6.0.jar:1.3.1]
at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:628) ~[hive-exec-2.0.1.jar:2.0.1]
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:548) ~[hive-exec-2.0.1.jar:2.0.1]
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:511) ~[hive-exec-2.0.1.jar:2.0.1]
at org.apache.hive.service.cli.CLIService.applyAuthorizationConfigPolicy(CLIService.java:125) ~[hive-jdbc-2.0.1-standalone.jar:2.0.1]
at org.apache.hive.service.cli.CLIService.init(CLIService.java:110) ~[hive-jdbc-2.0.1-standalone.jar:2.0.1]
... 12 more
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) ~[?:1.8.0_66]
at java.net.URI.<init>(URI.java:745) ~[?:1.8.0_66]
at org.apache.hadoop.fs.Path.initialize(Path.java:203) ~[spark-assembly-1.3.1-hadoop2.6.0.jar:1.3.1]
at org.apache.hadoop.fs.Path.<init>(Path.java:172) ~[spark-assembly-1.3.1-hadoop2.6.0.jar:1.3.1]
at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:628) ~[hive-exec-2.0.1.jar:2.0.1]
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:548) ~[hive-exec-2.0.1.jar:2.0.1]
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:511) ~[hive-exec-2.0.1.jar:2.0.1]
at org.apache.hive.service.cli.CLIService.applyAuthorizationConfigPolicy(CLIService.java:125) ~[hive-jdbc-2.0.1-standalone.jar:2.0.1]
at org.apache.hive.service.cli.CLIService.init(CLIService.java:110) ~[hive-jdbc-2.0.1-standalone.jar:2.0.1]
... 12 more