写在前面:
博主环境是CDH6.3.2,所有问题及配置围绕CDH展开
1.在HUE中执行hive写 *** 作失败 描述:执行动作: 向表中插入数据
INSERT into test_01 values(1,'abc123');
HUE页面报错: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask。
截图:
从报错看出,错误出在MR,问题应该出自yarn,所以到yarn日志中去找找根源
1)打开CDH主页面–>诊断——>日志 2)关键字填yarn,源选择服务即可一开始日志级别我选择ERROR,结果什么都没有搜索到,然后选WARN,再根据报错的job:job_1642046201730_0006最终找到如下内容
USER=admin OPERATION=Application Finished - Failed TARGET=RMAppManager RESULT=FAILURE DEscriptION=App failed with state: FAILED PERMISSIONS=Application application_1642046201730_0006 failed 2 times due to AM Container for appattempt_1642046201730_0006_000002 exited with exitCode: -1000
Failing this attempt.Diagnostics: [2022-01-13 14:18:08.276]Application application_1642046201730_0006 initialization failed (exitCode=255) with output: main : command provided 0
main : run as user is admin
main : requested yarn user is admin
User admin not found
问题一目了然,执行的用户是admin(这是我hue的管理用户),但是hadoop集群的主机中并没有admin用户,所以执行mr失败
解决方案:此处我采取最简单的方式,在hue上创建一个hive用户,然后再去执行insert *** 作,轻松加愉快
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)