hive执行报错 cdh5.1.2中?

发布于 2021-11-29 04:50:17 字数 4208 浏览 957 评论 3

在cdh5.1.2中执行hive,

执行诸如select id,name from test的语句

只有使用hdfs用户能正常执行,使用其他用户不可以

另外,使用hive jdbc执行SQL时,

Connection conn = DriverManager.getConnection(hiveJDBC, "hdfs","1eTbI7MrXa");

用户名一定要指定为hdfs,指定为其他用户报同样的错误

请大神解答?

其他用户执行时,yarn-RESOURCEMANAGER报如下错误

2014-09-23 23:06:01,210 INFO org.apache.hadoop.yarn.server.resourcemanager.scheduler.AppSchedulingInfo: Application application_1411466603254_0044 requests cleared
2014-09-23 23:06:01,232 INFO org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl: Application application_1411466603254_0044 failed 2 times due to AM Container for appattempt_1411466603254_0044_000002 exited with  exitCode: 1 due to: Exception from container-launch: org.apache.hadoop.util.Shell$ExitCodeException: 
org.apache.hadoop.util.Shell$ExitCodeException: 
        at org.apache.hadoop.util.Shell.runCommand(Shell.java:511)
        at org.apache.hadoop.util.Shell.run(Shell.java:424)
        at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:656)
        at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:195)
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:300)
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:81)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)




Container exited with a non-zero exit code 1
.Failing this attempt.. Failing the application.
2014-09-23 23:06:01,233 INFO org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl: application_1411466603254_0044 State change from FINAL_SAVING to FAILED
2014-09-23 23:06:01,233 WARN org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger: USER=hive     OPERATION=Application Finished - Failed TARGET=RMAppManager     RESULT=FAILURE  DESCRIPTION=App failed with state: FAILED  PERMISSIONS=Application application_1411466603254_0044 failed 2 times due to AM Container for appattempt_1411466603254_0044_000002 exited with  exitCode: 1 due to: Exception from container-launch: org.apache.hadoop.util.Shell$ExitCodeException: 
org.apache.hadoop.util.Shell$ExitCodeException: 
        at org.apache.hadoop.util.Shell.runCommand(Shell.java:511)
        at org.apache.hadoop.util.Shell.run(Shell.java:424)
        at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:656)
        at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:195)
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:300)
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:81)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)




Container exited with a non-zero exit code 1
.Failing this attempt.. Failing the application.        APPID=application_1411466603254_0044

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

千纸鹤带着心事 2021-11-29 23:12:37

ls查看一下hive文件的所属用户和用户组,我记得hive解压之后不是用户和用户组不是当前用户,修改改变

chown -R 当前用户:当前用户 hive根目录

试试看。

疑心病 2021-11-29 10:46:16

这样不好吧

旧伤慢歌 2021-11-29 08:04:35

您好:

    在linux中,先将用户su - hdfs下,然后用hadoop fs -chmod -R 777 /

    就是将hdfs文件夹的权限变成777,你试试吧!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文