当我有hive-site.xml时,hive shell不能打开 [英] hive shell not opening when I have hive-site.xml

查看:112
本文介绍了当我有hive-site.xml时,hive shell不能打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的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 WAR.conf.HiveConf:DEPRECATED:配置属性hive.metastore .local不再有任何效果。如果连接到远程元数据库,请确保为hive.metastore.uris提供有效值。
15/02/15 22:51:00 WARN conf.HiveConf:名称hive.metastore.local的HiveConf不存在

使用jar中的配置初始化日志:file:/ usr / lib / hive / apache-hive-0.14.0-bin / lib / hive-common-0.14.0.jar!/hive-log4j.properties
SLF4J:类路径包含多个SLF4J绑定。
SLF4J:在[jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]中找到绑定
SLF4J:在[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:请参阅http://www.slf4j.org/codes.html#multiple_bindings以获取解释。
SLF4J:实际绑定类型为[org.slf4j.impl.Log4jLoggerFactory] ​​
线程main中的异常java.lang.RuntimeException:java.lang.IllegalArgumentException:java.net.URISyntaxException:相对路径在绝对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)
在org.apache.hadoop.util.RunJar.main(RunJar.java:136)
引起:java.lang.IllegalArg umentException:java.net.URISyntaxException:绝对URI中的相对路径:$ {system:java.io.tmpdir%7D / $%7Bsystem:user.name%7D
at org.apache.hadoop.fs.Path。在org.apache.hadoop.fs.Path处初始化(Path.java:206)
。< init>(Path.java:172)$ or
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 $ b $由java.net.URISyntaxException导致:绝对URI中的相对路径:$ {system:java.io.tmpdir%7D / $%7Bsystem:user.name%7D $ b $ java.net.URI.checkPath( URI.java:1804)在java.net.URI上
。< init>(URI.java:752)
at org.apache.hadoop.fs.Path.initialize(Path.java:203 )

任何帮助都会很棒!

解决方案

您需要将以下配置添加到hive-site.xml中:

 <性> 
<名称> hive.querylog.location< / name>
<值> $ HIVE_HOME / iotmp< /值>
< description> Hive运行时结构化日志文件的位置< / description>
< / property>

<属性>
< name> hive.exec.local.scratchdir< / name>
<值> $ HIVE_HOME / iotmp< /值>
< description> Hive作业的本地暂存空间< / description>
< / property>

<属性>
< name> hive.downloaded.resources.dir< / name>
<值> $ HIVE_HOME / iotmp< /值>
< description>远程文件系统中添加资源的临时本地目录。< / description>
< / property>

切记用您的配置单元目录替换$ HIVE_HOME

I have installed ubuntu 14 and hadoop 2.6.0 and Hive 0.14.0 in my VM player. In my Hive/conf there is no Hive-site.xml, so I created a new file. But I have getting error when I open Hive shell. If I delete the hive-site.xml file, I can open the shell. Why is this? what should I do? The Hive error is as follows:

> 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.<init>(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.<init>(URI.java:752)
    at org.apache.hadoop.fs.Path.initialize(Path.java:203)

Any Help would be great!

解决方案

you need to add following configuration into hive-site.xml

<property>
    <name>hive.querylog.location</name>
    <value>$HIVE_HOME/iotmp</value>
    <description>Location of Hive run time structured log file</description>
  </property>

  <property>
    <name>hive.exec.local.scratchdir</name>
    <value>$HIVE_HOME/iotmp</value>
    <description>Local scratch space for Hive jobs</description>
  </property>

  <property>
    <name>hive.downloaded.resources.dir</name>
    <value>$HIVE_HOME/iotmp</value>
    <description>Temporary local directory for added resources in the remote file system.</description>
  </property>

remember to replace $HIVE_HOME with your hive directory

这篇关于当我有hive-site.xml时,hive shell不能打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆