hive错误:Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Permission denied

古城微笑少年丶 2022-08-21 10:57 95阅读 0赞

用不同用户去登录hive

可能会报如下错误:

Exception in thread “main” java.lang.RuntimeException: java.io.IOException: Permission denied

  1. at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:330)
  2. at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
  3. at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
  4. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  5. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  6. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  7. at java.lang.reflect.Method.invoke(Method.java:597)
  8. 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)

  1. ... 7 more

解决办法

把hive参数hive.exec.scratchdir 设置的目录

一般为 /tmp/hive

权限调整为777即可

即: chmod -R 777 /hive/tmp

发表评论

表情:
评论列表 (有 0 条评论,95人围观)

还没有评论,来说两句吧...

相关阅读