在运行hive的时候出现的问题

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-wx--x
    at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:472)
    at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:671)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:615)
    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-wx--x
    at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:557)
    at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:506)

    at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:458)



经过调查,原来是权限不足,那么久执行

hadoop fs -chmod 777 /tmp/hive


你可能感兴趣的:(exception,hive)