我尝试启动 mapreduce 作业,但在 shell 或 hive 中执行作业时出现错误:
蜂巢>从员工中选择计数(*);查询 ID = mapr_20171107135114_a574713d-7d69-45e1-aa73-d4de07a3059b 总作业 = 1 启动作业 1 / 1 在编译时确定的缩减任务数:1 为了更改缩减器的平均负载(以字节为单位):设置 hive。 exec.reducers.bytes.per.reducer= 为了限制reducer 的最大数量:set hive.exec.reducers.max= 为了设置一个恒定的reducer 数量:set mapreduce.job.reduces= 开始Job = job_1510052734193_0005 , 跟踪 URL = http://hdpsrvpre2.intranet.darty.fr:8088/proxy/application_1510052734193_0005/ Kill Command = /opt/mapr/hadoop/hadoop-2.7.0/bin/hadoop job -kill job_1510052734193_0005 Stage-1的Hadoop作业信息:映射器数量:0;减速器数量:0 2017-11-07 13:51:25,951 Stage-1 map = 0%,reduce = 0% Ended Job = job_1510052734193_0005 with errors 作业期间出错,获取调试信息... **FAILED:执行错误,从 org.apache.hadoop.hive.ql.exec.mr.MapRedTask 返回代码 2 已启动 MapReduce 作业:Stage-Stage-1:MAPRFS 读取:0 MAPRFS 写入:0 FAIL MapReduce CPU 总时间花费:0 mse
在 Ressourcemanager 日志中,我发现了什么:
> 2017-11-07 13:51:25,269 INFO org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptImpl:
> appattempt_1510052734193_0005_000002 State change from LAUNCHED to
> FINAL_SAVING 2017-11-07 13:51:25,269 INFO
> org.apache.hadoop.yarn.server.resourcemanager.recovery.FileSystemRMStateStore:
> Updating info for attempt: appattempt_1510052734193_0005_000002 at:
> /var/mapr/cluster/yarn/rm/system/FSRMStateRoot/RMAppRoot/application_1510052734193_0005/appattempt_1510052734193_0005_000002
> 2017-11-07 13:51:25,283 INFO
> org.apache.hadoop.yarn.server.resourcemanager.ApplicationMasterService:
> Unregistering app attempt : appattempt_1510052734193_0005_000002
> 2017-11-07 13:51:25,283 INFO
> org.apache.hadoop.yarn.server.resourcemanager.security.AMRMTokenSecretManager:
> Application finished, removing password for
> appattempt_1510052734193_0005_000002 2017-11-07 13:51:25,283 **INFO
> org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptImpl:
> appattempt_1510052734193_0005_000002 State change from FINAL_SAVING to
> FAILED** 2017-11-07 13:51:25,284 INFO
> org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl: The
> number of failed attempts is 2. The max attempts is 2 2017-11-07
> 13:51:25,284 INFO
> org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl:
> Updating application application_1510052734193_0005 with final state:
> FAILED 2017-11-07 13:51:25,284 INFO
> org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl:
> application_1510052734193_0005 State change from ACCEPTED to
> FINAL_SAVING 2017-11-07 13:51:25,284 INFO
> org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStore:
> Updating info for app: application_1510052734193_0005 2017-11-07
> 13:51:25,284 INFO
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler:
> Application appattempt_1510052734193_0005_000002 is done.
> finalState=FAILED 2017-11-07 13:51:25,284 INFO
> org.apache.hadoop.yarn.server.resourcemanager.recovery.FileSystemRMStateStore:
> Updating info for app: application_1510052734193_0005 at:
> /var/mapr/cluster/yarn/rm/system/FSRMStateRoot/RMAppRoot/application_1510052734193_0005/application_1510052734193_0005
> 2017-11-07 13:51:25,284 INFO
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.AppSchedulingInfo:
> Application application_1510052734193_0005 requests cleared 2017-11-07
> 13:51:25,296 INFO
> org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl:
> Application application_1510052734193_0005 failed 2 times due to AM
> Container for appattempt_1510052734193_0005_000002 exited with
> exitCode: 1 For more detailed output, check application tracking
> page:http://hdpsrvpre2.intranet.darty.fr:8088/cluster/app/application_1510052734193_0005Then,
> click on links to logs of each attempt. Diagnostics: Exception from
> container-launch. Container id:
> container_e10_1510052734193_0005_02_000001 Exit code: 1 Stack trace:
> ExitCodeException exitCode=1: at
> org.apache.hadoop.util.Shell.runCommand(Shell.java:545) at
> org.apache.hadoop.util.Shell.run(Shell.java:456) at
> org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:722)
> at
> org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor.launchContainer(LinuxContainerExecutor.java:304)
> at
> org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:354)
> at
> org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:87)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
> at java.lang.Thread.run(Thread.java:748) Shell output: main : command
> provided 1 main : user is mapr main : requested yarn user is mapr
>
> Container exited with a non-zero exit code 1 Failing this attempt. Failing the application.
另外,在我发现的工作系统日志中:
2017-11-07 12:09:46,419 FATAL [main] app.DAGAppMaster:启动 DAGAppMaster java.lang.IllegalArgumentException 时出错:ContainerId 无效:在 org.apache.hadoop.yarn.util.ConverterUtils.toContainerId(ConverterUtils. 182) 在 org.apache.tez.dag.app.DAGAppMaster.main(DAGAppMaster.java:1794) 引起:java.lang.NumberFormatException:对于输入字符串:
java.lang.NumberFormatException.forInputString(NumberFormatException. java:65) 在 java.lang.Long.parseLong(Long.java:441) 在 java.lang.Long.parseLong(Long.java:483) 在 org.apache.hadoop.yarn.util.ConverterUtils.toApplicationAttemptId(ConverterUtils .java:137) 在 org.apache.hadoop.yarn.util.ConverterUtils.toContainerId(ConverterUtils.java:177) ... 还有 1 个
似乎是 Tez 导致了这个问题,有什么解决方案可以解决这个问题吗?谢谢 !