繁体   English   中英

从Windows Eclipse运行Mapreduce(yarn)时出错

[英]Error while running Mapreduce(yarn)from windows eclipse

我正在从日食中运行WordCount程序。 我尝试使用Hadoop1.x正常运行。 在hadoop2.x上运行时遇到问题

我尝试了1)将所有xml添加到我的类路径中。 2)还尝试了conf.set(),在conf对象中设置xml属性。

在日志中还显示:-没有可用的日志,用于容器container_1394042163908_0573_01_000001

  Application application_1394042163908_0573 failed 2 times due to AM Container for      appattempt_1394042163908_0573_000002 exited with exitCode: 1 due to: Exception from container-launch:
org.apache.hadoop.util.Shell$ExitCodeException: /bin/bash: line 0: fg: no job control
at org.apache.hadoop.util.Shell.runCommand(Shell.java:464)
at org.apache.hadoop.util.Shell.run(Shell.java:379)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:589)
at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerEx    ecutor.java:195)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:283)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:79)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)`enter code here`
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
.Failing this attempt.. Failing the application.

我已经解决了这个问题,有一个解决方案: https : //issues.apache.org/jira/browse/MAPREDUCE-5655

我刚刚将YARNRunner.java和MRApps.java添加到了我的项目中。 它还要求在Windows框上的mapred-site.xml中添加以下属性,以便作业启动器知道作业运行器将是Linux:

<property>
<name>mapred.remote.os</name>
<value>Linux</value>
<description>Remote MapReduce framework's OS, can be either Linux or Windows</description>
</property>

而且MapReduce现在运行良好。

还将org.apache.hadoop.util.Shell.java复制到您的项目中。

您可以注释掉以下行,以清除winutils.exe错误。
抛出新的IOException(“在Hadoop二进制文件中找不到可执行文件” + fullExeName +“。);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM