使用ApacheHadoop1.2.1配置ApacheHive1.0时遇到的hadoop问题

wj8zmpe1  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(205)

在.bashrc文件中配置后,在终端中运行配置单元时遇到下面提到的权限问题。

hadoop@hadoop:~$ 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
3phpmpom

3phpmpom1#

这是一个权限问题,与bashrc文件无关。对hdfs中的/tmp目录授予适当的权限,您就可以了。
你可以用

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

相关问题