hiveserver2启动然后很快停止

时间:2017-05-31 01:27:08

标签: hadoop hive

我在Mac Sierra上运行配置单元,基本上客户端配置工作。但是,当我启动hiveserver2时,它运行一点然后退出。我用2种方法启动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>
...

但是,我没有看到在日志目录中创建的任何内容

1 个答案:

答案 0 :(得分:0)

如果它毫无疑问地开启或关闭,您需要使用beeline进行检查。在一个示例中,HiveServer2进程在端口52000上的localhost上运行:

$ 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