Login to hive with different users
The following error may be reported:
Exception in thread ' main ' java.lang.RuntimeException:java.io.IOException:Permission denied at Org.apache.hadoop . Hive.ql.session.SessionState.start (sessionstate.java:330)
At Org.apache.hadoop.hive.cli.CliDriver.run (clidriver.java:681)
At Org.apache.hadoop.hive.cli.CliDriver.main (clidriver.java:625)
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:25)
At Java.lang.reflect.Method.invoke (method.java:597)
At Org.apache.hadoop.util.RunJar.main (runjar.java:212)
caused By:java.io.IOException:Permission denied
At Java.io.UnixFileSystem.createFileExclusively (Native method)
At Java.io.File.checkAndCreate (file.java:1704)
At Java.io.File.createTempFile (file.java:1792)
At Org.apache.hadoop.hive.ql.session.SessionState.createTempFile (sessionstate.java:432)
At Org.apache.hadoop.hive.ql.session.SessionState.start (sessionstate.java:328)
... 7 more
Solutions
The directory that sets the hive parameter Hive.exec.scratchdir
Generally for/tmp/hive
Permission adjusted to 777
namely: Chmod-r 777/hive/tmp