在hadoop-2.6.0上运行map-reduce作业时出错

时间:2015-04-02 07:42:58

标签: mapreduce yarn hadoop2

我正在使用apache hadoop-2.6.0在本地运行map-reduce作业,并收到此错误:

15/04/02 13:00:26 INFO mapreduce.Job:  map 0% reduce 0%
15/04/02 13:00:26 INFO mapreduce.Job: Job job_1427959779168_0001 failed with state FAILED due to: Application application_1427959779168_0001 failed 2 times due to AM Container for appattempt_1427959779168_0001_000002 exited with  exitCode: 127
For more detailed output, check application tracking page:http://Ha-Ha-Ha.local:8088/proxy/application_1427959779168_0001/Then, click on links to logs of each attempt.
Diagnostics: Exception from container-launch.
Container id: container_1427959779168_0001_02_000001
Exit code: 127
Stack trace: ExitCodeException exitCode=127: 
    at org.apache.hadoop.util.Shell.runCommand(Shell.java:538)
    at org.apache.hadoop.util.Shell.run(Shell.java:455)
    at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:715)
    at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:211)
    at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:302)
    at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:82)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

有人可以提出可能导致这种情况的原因吗?

1 个答案:

答案 0 :(得分:0)

您可以查看类路径设置。请尝试在HADOOP_COMMON_HOME中设置变量HADOOP_HDFS_HOMEHADOOP_YARN_HOMEHADOOP_MAPRED_HOMEhadoop-env.sh以指向相应的/usr/lib下的目录。希望它有所帮助!!