从windows eclipse运行Mapreduce(yarn)时出错



我正在运行我的eclipse中的WordCount程序。我尝试使用Hadoop1。X,它运行良好。在hadoop2.x上运行时遇到问题

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

同样在日志中它说:-No logs available for container 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.

我已经找到了这个问题,有一个jira:https://issues.apache.org/jira/browse/MAPREDUCE-5655

我刚刚添加了YARNRunner.java &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("Could not locate executable " + fulllexename + " in Hadoop二进制文件");

相关内容

  • 没有找到相关文章

最新更新