安装Hive过程中,出现Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxExcepti
2017-05-24 23:15
736 查看
一,在安装hive过程中,输入hive命令,出现了如下错误:
二,出现的原因:
1,hive-site.xml里的临时目录没有设置好,一共有三个:
三,解决的方法:
1,将hive-site.xml文件中的${system:java.io.tmpdir}替换为hive的临时目录,例如我替换为/home/lch/software/Hive/apache-hive-2.1.1-bin/tmp/,该目录(tmp)如果不存在则要自己手工创建,并且赋予读写权限。
2, 具体修改如下:
问题就解决了.
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:644) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:563) at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:531) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641) 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) ... 12 more
二,出现的原因:
1,hive-site.xml里的临时目录没有设置好,一共有三个:
<property> <name>Hive.exec.local.scratchdir</name> <value>${system:Java.io.tmpdir}/${system:user.name}</value> <description>Local scratch space for Hive jobs</description> </property> <property> <name>hive.downloaded.resources.dir</name> <value>${system:java.io.tmpdir}/${hive.session.id}_resources</value> <description>Temporary local directory for added resources in the remote file system.</description> </property> <property> <name>hive.server2.logging.operation.log.location</name> <value>/home/lch/software/Hive/apache-hive-2.1.1-bin/tmp/${system:user.name}/operation_logs</value> <description>Top level directory where operation logs are stored if logging functionality is enabled</description> </property>
三,解决的方法:
1,将hive-site.xml文件中的${system:java.io.tmpdir}替换为hive的临时目录,例如我替换为/home/lch/software/Hive/apache-hive-2.1.1-bin/tmp/,该目录(tmp)如果不存在则要自己手工创建,并且赋予读写权限。
2, 具体修改如下:
<property> <name>Hive.exec.local.scratchdir</name> <value>/home/lch/software/Hive/apache-hive-2.1.1-bin/tmp//${system:user.name}</value> <description>Local scratch space for Hive jobs</description> </property> <property> <name>hive.downloaded.resources.dir</name> <value>/home/lch/software/Hive/apache-hive-2.1.1-bin/tmp/${hive.session.id}_resources</value> <description>Temporary local directory for added resources in the remote file system.</description> </property> <property> <name>hive.server2.logging.operation.log.location</name> <value>/home/lch/software/Hive/apache-hive-2.1.1-bin/tmp/root/operation_logs</value> <description>Top level directory where operation logs are stored if logging functionality is enabled</description> </property>
问题就解决了.
相关文章推荐
- Hive2.1:Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException:
- spark Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Re
- Hive连接MYSQL数据OK,查询出现in thread "Thread-18" java.lang.IllegalArgumentException:Does not contain a vali
- 启动hive错误:Exception in thread "main" java.lang.IllegalArgumentException
- exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: java.net.
- hive异常 java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7
- 实战 - Hive 写入数据时报错:java.lang.IllegalArgumentException: java.net.URISyntaxException
- 使用idea编辑sparkSql的程序运行出现java.lang.IllegalArgumentException: java.net.URISyntaxException
- [未解决]Exception in thread "main" java.lang.IllegalArgumentException: offset (0) + length (8) exceed the capacity of the array: 6
- Exception in thread "main" java.lang.IllegalArgumentException: input == null!
- 【转载】安装maven3.5时出现Exception in thread "main" java.lang.UnsupportedClassVersionError
- Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: hdfs://node1:9000/input/pia
- Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: hdfs://node1:9000/input/pia
- FAILED java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI:hdfs:192.*
- java 集合排序异常Exception in thread "main" java.lang.IllegalArgumentException: Comparison method violate
- Exception in thread "main" java.lang.IllegalArgumentException: Argument cannot be null
- Exception in thread "main" java.lang.IllegalArgumentException: Illegal character in query at index 189......
- CentOS6.3 静默安装Oracle 11G过程中提示:Exception in thread "main" java.lang.NoClassDefFoundError
- Exception in thread "main" java.lang.IllegalArgumentException: Illegal character in query at index x
- Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: hdfs://node1:9000/input/pia