2017-05-31 320 views
1

我在我的Mac Sierra上運行配置單元,基本上客戶端配置單元工作。但是,當我啓動hiveserver2時,它會運行一段時間,然後退出。我開始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] 

也許我需要一些日誌,但我不能。我配置蜂房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> 
... 

不過,我沒有看到日誌目錄

+0

嘗試在不同的端口上運行(默認端口爲10000)。 hive --service hiveserver2 --hiveconf hive.server2.thrift.port = 10001 – pkgajulapalli

+0

同樣的問題 –

回答

0

你需要使用直線,如果它是打開或關閉毫無疑問,檢查創建任何東西。在一個例子中HiveServer2過程在端口52000的本地主機上運行:

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

另一件事就是用開始爲documentation。要啓動HiveServer2:

$ sudo service hive-server2 start 

要停止HiveServer2:

$ sudo service hive-server2 stop