#本地运行spark程序报错
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: tmp/hive on HDFS should be writable. Current permissions are: rw-rw-rw- at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:522) at org.apache.spark.sql.hive.client.HiveClientImpl.(HiveClientImpl.scala:188) ... 38 more Caused by: java.lang.RuntimeException: The root scratch dir: tmp/hive on HDFS should be writable. Current permissions are: rw-rw-rw- at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:612) at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:554) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:508) ... 39 more
解决方法:加上hdfs路径
hive.exec.scratchdir hdfs://hdp1:8020/tmp/hive



