2015-02-23 42 views
-1

在配置到.bashrc文件後,在終端中運行配置單元時遇到了下面提到的權限問題。使用apache配置apache Hive1.0時遇到問題hadoop1.2.1

[email protected]:~$ hive 

Logging initialized using configuration in jar:file:/home/hadoop/Downloads/apache-hive-1.0.0/lib/hive-common-1.0.0.jar!/hive-log4j.properties 
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rwx--x--x 
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:444) 
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:626) 
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:570) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:606) 
at org.apache.hadoop.util.RunJar.main(RunJar.java:160) 

Caused by: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rwx--x--x 
at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:529) 
at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:478) 
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:430) 
... 7 more 
+0

爲什麼-1投票爲這個問題?這個問題有什麼不對嗎? – Ravikanth 2015-02-23 15:31:51

+0

您的問題正在被投票,因爲錯誤堆棧清楚地顯示問題與權限。 – Harman 2015-02-23 16:01:20

回答

0

這是一個權限問題,與bashrc文件無關。給予HDFS中/ tmp目錄適當的權限,你應該沒問題。

您可以使用

hadoop fs -chmod [-R] <permissions> <directory> 
+0

其中的/ tmp文件位於。我沒有明確地給出任何文件/文件夾名稱作爲'/ tmp'。 – Ravikanth 2015-02-23 17:43:20

+0

: - 我給了「hadoop fs -chmod [-R] 755/tmp/hive」命令。但它仍然給出同樣的錯誤。 – Ravikanth 2015-02-23 17:52:08

+0

目錄的所有者是誰?使用該命令時刪除方括號。 R是遞歸的 – Harman 2015-02-24 09:33:10