问题描述
我在Mac Sierra上运行配置单元,基本上客户端配置单元工作正常。但是,当我启动hiveserver2时,它会运行一段时间,然后退出。我通过2种方法启动hiveserver2,无论是 hive --service hiveserver2
或
$ HIVE_HOME / bin / hiveserver2
结果和输出在两种情况下都是相同的:
SLF4J:类路径包含多个SLF4J绑定。
SLF4J:在[jar:file:/usr/local/Cellar/hive/2.1.0/libexec/lib/log4j-slf4j-impl-2.4.1.jar!/ org / slf4j / impl / StaticLoggerBinder.class]
SLF4J:在[jar:file:/usr/local/Cellar/hadoop/2.8.0/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar中找到绑定!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J:请参阅http://www.slf4j.org/codes.html#multiple_bindings以获取解释。
SLF4J:实际绑定类型为[org.apache.logging.slf4j.Log4jLoggerFactory]
可能我需要得到一些日志,但我不能。我在hive-site.xml中配置日志如下:
< name> hive.server2.logging.operation.enabled< / name>
<值> true< /值>
< description>如果为true,则HS2将保存操作日志并使其可用于客户端< / description>
< / property>
<属性>
<名称> hive.server2.logging.operation.log.location< / name>
<值> /usr/local/Cellar/hive/2.1.0/libexec/log< /值>
< description>如果启用了日志记录功能,存储操作日志的顶级目录< / description>
< / property>
<属性>
< name> hive.server2.logging.operation.level< / name>
<值> VERBOSE< /值>
...
但是,我没有在日志目录中看到任何内容 p>
如果毫无疑问地开启或关闭,则需要使用直线进行检查。在一个示例中,HiveServer2进程在端口52000上的localhost上运行:
$ beeline
直线> !connect jdbc:hive2:// localhost:52000 username password org.apache.hive.jdbc.HiveDriver
0:jdbc:hive2:// localhost:52000>
,
另一件事是使用从开始。要启动HiveServer2:
$ sudo service hive-server2 start
$ p
停止HiveServer2:
$ sudo service hive-server2 stop
I run hive on my Mac Sierra and basically the client hive works. However, when I start hiveserver2 it runs a little and then exits. I start hiveserver2 by 2 methods, either
hive --service hiveserver2
Or
$HIVE_HOME/bin/hiveserver2
The result and output are the same in both cases:
SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/local/Cellar/hive/2.1.0/libexec/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/local/Cellar/hadoop/2.8.0/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.10.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.apache.logging.slf4j.Log4jLoggerFactory]
Probably I need to get some logs but I cannot. I configure logging in hive-site.xml as follows:
<property> <name>hive.server2.logging.operation.enabled</name> <value>true</value> <description>When true, HS2 will save operation logs and make them available for clients</description> </property> <property> <name>hive.server2.logging.operation.log.location</name> <value>/usr/local/Cellar/hive/2.1.0/libexec/log</value> <description>Top level directory where operation logs are stored if logging functionality is enabled</description> </property> <property> <name>hive.server2.logging.operation.level</name> <value>VERBOSE</value> ...
However, I do not see anything created in the log directory
解决方案You need to check using beeline if it's on or off without a doubt. In one example the HiveServer2 process is running on localhost at port 52000:
$ beeline beeline> !connect jdbc:hive2://localhost:52000 username password org.apache.hive.jdbc.HiveDriver 0: jdbc:hive2://localhost:52000>
,
Another thing is to use start as in documentation. To start HiveServer2:
$ sudo service hive-server2 start
To stop HiveServer2:
$ sudo service hive-server2 stop
这篇关于hiveserver2启动,然后很快停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!