我在Mac Sierra上运行配置单元,基本上客户端配置单元都可以运行。但是,当我启动hiveserver2时,它会运行一些然后退出。我通过两种方法启动hiveserver2

hive --service hiveserver2

要么
$HIVE_HOME/bin/hiveserver2

在两种情况下,结果和输出相同:
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]

可能我需要获取一些日志,但是我不能。我在hive-site.xml中配置日志记录,如下所示:
<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>
...

但是,我在日志目录中看不到任何内容

最佳答案

毫无疑问,您需要检查Beeline是否打开或关闭。在一个示例中,HiveServer2进程在本地主机上的端口52000上运行:

$ beeline
beeline> !connect jdbc:hive2://localhost:52000 username password org.apache.hive.jdbc.HiveDriver
0: jdbc:hive2://localhost:52000>



另一件事是像documentation中那样使用start。要启动HiveServer2:
$ sudo service hive-server2 start

要停止HiveServer2:
$ sudo service hive-server2 stop

关于hadoop - hiveserver2启动,然后很快停止,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44274236/

10-12 23:46