作者:酸葡萄洗澡她_606 | 来源:互联网 | 2023-05-21 19:13
我在我的VM播放器中安装了ubuntu 14和hadoop 2.6.0以及Hive 0.14.0.在我的Hive/conf中没有Hive-site.xml,所以我创建了一个新文件.但是当我打开Hive shell时我遇到了错误.如果我删除了hive-site.xml文件,我可以打开shell.为什么是这样?我该怎么办?Hive错误如下:
> hduser@ubuntu:/usr/lib/hive/apache-hive-0.14.0-bin/bin$ hive
15/02/15 22:51:00 WARN conf.HiveConf: DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.
15/02/15 22:51:00 WARN conf.HiveConf: HiveConf of name hive.metastore.local does not exist
Logging initialized using configuration in jar:file:/usr/lib/hive/apache-hive-0.14.0-bin/lib/hive-common-0.14.0.jar!/hive-log4j.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/lib/hive/apache-hive-0.14.0-bin/lib/hive-jdbc-0.14.0-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:444)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:672)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:616)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
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)
at org.apache.hadoop.fs.Path.(Path.java:172)
at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:487)
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:430)
... 8 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:1804)
at java.net.URI.(URI.java:752)
at org.apache.hadoop.fs.Path.initialize(Path.java:203)
任何帮助都会很棒!
1> 小智..:
您需要将以下配置添加到hive-site.xml中
hive.querylog.location
$HIVE_HOME/iotmp
Location of Hive run time structured log file
hive.exec.local.scratchdir
$HIVE_HOME/iotmp
Local scratch space for Hive jobs
hive.downloaded.resources.dir
$HIVE_HOME/iotmp
Temporary local directory for added resources in the remote file system.
记得用您的hive目录替换$ HIVE_HOME
2> Jonathan L..:
将以下内容放在hive-site.xml的开头
system:java.io.tmpdir
/tmp/hive/java
system:user.name
${user.name}
也看到这个问题
3> shriyog..:
首先,您需要将配置从复制hive-default.xml.template
到创建的hive-site.xml
如《Hive管理员配置》手册中所述,
设置以下配置
hive.querylog.location
/tmp/hive
Location of Hive run time structured log file
hive.exec.local.scratchdir
/tmp/hive
Local scratch space for Hive jobs
hive.downloaded.resources.dir
/tmp/hive
Temporary local directory for added resources in the remote file system.
对我来说,开始养蜂和养蜂都行得通。