当前位置: 首页 > 面试题库 >

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

宁弘亮
2023-03-14
问题内容

我正在从日食中运行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二进制文件中找不到可执行html" target="_blank">文件” + fullExeName +“。);



 类似资料:
  • Angel On Yarn运行 由于业界很多公司的大数据平台,都是基于Yarn搭建,所以Angel目前的分布式运行是基于Yarn,方便用户复用现网环境,而无需任何修改。 鉴于Yarn的搭建步骤和机器要求,不建议在小机器上,进行尝试该运行。如果一定要运行,最少需要6G的内存(1ps+1worker+1am),最好有10G的内存,比较宽裕。 1. 运行环境准备 Angel的分布式Yarn运行模式需要的

  • 嘿,伙计们,我正在跟踪http://www.tutorialspoint.com/hadoop/hadoop_mapreduce.htm。使用这个运行程序后 我收到以下错误: 2004年9月16日20:32:14警告用户。NativeCodeLoader:无法为您的平台加载本机hadoop库。。。在适用的情况下使用内置java类 2004年9月16日20:32:15信息配置。弃用:会话。id已弃用

  • 减速器正在计算所有相同的值: 然而,当我在hadoop上运行一个更大的数据集时,似乎丢失了一半的结果。当我在本地机器上使用cat input mapper.py sort reducer.py>out-local测试它时,如果输入合理地很小,它工作得很好,但是在更大的数据集上(例如1M个条目),本地输出文件的条目几乎是在Hadoop上运行mapreduce作业的两倍。代码有错误吗?还是我漏掉了什么

  • 我正在使用Sonarqube优化项目中的代码质量,并尝试将其添加到GitLab上的CI周期中,但出现了一个错误。当我在IntelliJ终端中运行mvn sonar:sonar时,它可以工作,但在我的GitLab CI中执行时不知何故抛出了一个错误。错误是: 无法执行目标组织。声纳源。扫描仪。maven:sonar maven插件:3.7.0.1746:rlstop项目上的sonar(默认cli):

  • 我想使用Java中的将csv数据文件放入HBase表中。 HBase和Phoenix在Ubuntu虚拟机上运行。 从Windows运行时,会出现下一个异常: 顺便说一句,当我我的示例应用程序在Ubuntu VM上运行时,我会遇到nex异常: 其中是Ubuntu VM上的实际jar文件位置。 我在这里使用了示例。 此外,当我使用普通的JDBC通过Phoenix连接和填充表时,一切都正常。

  • 我正在尝试自学一些hadoop基础知识,因此已经构建了一个简单的hadoop集群。这样可以工作,并且我可以从hdfs文件系统中put,ls,cat而没有任何问题。所以我采取了下一步,尝试对我放入hadoop的文件进行单词计数,但我得到了以下错误 我可以ls Hadoop: hadoop版本: hadoop类路径: 很明显我错过了什么,所以谁能给我指出正确的方向。