RuntimeException: root scratch dir: /tmp/hive在HDFS上应该是可写的。当前权限为:rwx——

 

Logging initialized using configuration in jar:file:/export/servers/hive-1.1.0-cdh5.14.0/lib/hive-common-1.1.0-cdh5.14.0.jar!/hive-log4j.properties Exception in thread "main" java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rwx------ at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:674) at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:606) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:547) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:695) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:634) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hadoop.util.RunJar.run(RunJar.java:221) at org.apache.hadoop.util.RunJar.main(RunJar.java:136

 

RuntimeException: root scratch dir: /tmp/hive在HDFS上应该是可写的。当前权限为:rwx——

 

解决方案

hadoop dfs -chmod -R 777 /tmp/hive/