gpt4 book ai didi

hadoop - Hadoop JobHistory仅显示失败的作业

转载 作者:行者123 更新时间:2023-12-02 20:49:58 24 4
gpt4 key购买 nike

我正在尝试监视《权威Hadoop》一书中名为“查找最高温度”的MapReduce示例应用程序的作业。在Hadoop-2.6的默认安装和配置下,该应用程序可以完美运行,即计算年度最高温度。但是,在像下面扩展了mapred-site.xml和yarn-site.xml的配置后:(取自How do I view my Hadoop job history and logs using CDH4 and Yarn?YARN job history not coming)

mapred-site.xml:

<property>
<name> mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>mapreduce.jobhistory.address</name>
<value>localhost:10020</value>
</property>
<property>
<name>mapreduce.jobhistory.webapp.address</name>
<value>localhost:19888</value>
</property>

yarn-site.xml:
  <property>
<name>yarn.log-aggregation-enable</name>
<value>true</value>
</property>
<property>
<name>yarn.nodemanager.remote-app-log-dir</name>
<value>/app-logs</value>
</property>
<property>
<name>yarn.nodemanager.remote-app-log-dir-suffix</name>
<value>logs</value>
</property>

当我运行相同的MaxTemperature应用程序时,该应用程序运行良好,并输出了名为part-r-00000的文件,但在JobHistory页面上的localhost:19888上看不到它。 (同时位于localhost:8042,localhpst:8088和localhost:50070的其他页面也可以正常工作)

当它们在任何Hadoop页面上运行时,是否可以查看所有作业?

有时,当我运行相同的应用程序时,会出现此错误:

17/09/19 11:07:49 INFO mapreduce.Job: Task Id : attempt_1505767853223_0003_m_000005_1, Status : FAILED Container launch failed for container_1505767853223_0003_01_000013 : org.apache.hadoop.yarn.exceptions.InvalidAuxServiceException: The auxService:mapreduce_shuffle does not exist at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at org.apache.hadoop.yarn.api.records.impl.pb.SerializedExceptionPBImpl.instantiateException(SerializedExceptionPBImpl.java:168) at org.apache.hadoop.yarn.api.records.impl.pb.SerializedExceptionPBImpl.deSerialize(SerializedExceptionPBImpl.java:106) at org.apache.hadoop.mapreduce.v2.app.launcher.ContainerLauncherImpl$Container.launch(ContainerLauncherImpl.java:155) at org.apache.hadoop.mapreduce.v2.app.launcher.ContainerLauncherImpl$EventProcessor.run(ContainerLauncherImpl.java:369) 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)



如果出现此错误,它将显示在JobHistory页面上。我不知道为什么有时会失败,但是它是在重新启动Hadoop之后发生的: start-dfs.sh start-yarn.sh /usr/local/hadoop-2.6.0/sbin/ mr-jobhistory-daemon.sh启动历史服务器
这是3个作业失败后的SS:
enter image description here

最佳答案

谷歌搜索org.apache.hadoop.yarn.exceptions.InvalidAuxServiceException:auxService:mapreduce_shuffle不存在,返回了此帖子
org.apache.hadoop.yarn.exceptions.InvalidAuxServiceException: The auxService:mapreduce_shuffle does not exist

将这些行添加到yarn-site.xml中的配置中:

<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>

解决了问题。现在,所有作业(无论成功还是失败)都显示在JobHistory页面上。这是一个SS:

enter image description here

关于hadoop - Hadoop JobHistory仅显示失败的作业,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46295528/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com