2017-05-13 35 views
0

brew安裝的配置單元在成熟時似乎有點害羞。首先,我不得不手動編輯德比initailization腳本:Hive cli無法從brew安裝配置單元運行

Unable to initialize hive with Derby from Brew install

做如此..開始cli它只是掛起時:

$hive 
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.7.3/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] 

Logging initialized using configuration in jar:file:/usr/local/Cellar/hive/2.1.0/libexec/lib/hive-common-2.1.0.jar!/hive-log4j2.properties Async: true 

所以現在已經遇到了兩個嚴重的問題..還沒有看到hive實際上工作..有沒有已知的解決方法或更好的替代brew [re]install hive

更新:我發現了另一個Q & A解決了我的問題的第二部分。

配置蜂巢,以本地模式運行的

https://stackoverflow.com/a/33312359/1056563

回答

1

你可以嘗試增加日誌級別,看看是怎麼回事。日誌記錄配置似乎位於jar文件中,但基於source in git,您可以使用系統屬性hive.log.level更改根記錄器級別。默認值是INFO,因此請嘗試使用-Dhive.log.level=DEBUG或甚至TRACE運行。

您可能會忽略關於多個SLF4J綁定的警告,但如果您擔心,Log4j2 FAQ將解釋如何排除對舊log4j slf4j綁定的依賴關係。

<dependencies> 
    <dependency> 
    <groupId>com.example</groupId> 
    <artifactId>example-project</artifactId> 
    <version>1.0</version> 
    <exclusions> 
     <exclusion> 
     <groupId>log4j</groupId> 
     <artifactId>log4j</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-log4j12</artifactId> 
     </exclusion> 
    </exclusions> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.logging.log4j</groupId> 
    <artifactId>log4j-core</artifactId> 
    <version>2.8.2</version> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.logging.log4j</groupId> 
    <artifactId>log4j-slf4j-impl</artifactId> 
    <version>2.8.2</version> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.logging.log4j</groupId> 
    <artifactId>log4j-1.2-api</artifactId> 
    <version>2.8.2</version> 
    </dependency> 
</dependencies> 
+0

該OP實際上是關於'cli' *懸掛*。 – javadba

+0

@javadba謝謝你指出。更新我的答案是更相關的。 –

+0

好吧,這在任何情況下都是有幫助的,因此upvoted – javadba