Hadoop Resource Manager存储应用程序信息多久? [英] How long does the Hadoop Resource Manager store the application information?

查看:84
本文介绍了Hadoop Resource Manager存储应用程序信息多久?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用官方REST API从Hadoop资源管理器中的各种用户和应用程序读取资源使用情况。我们的问题是,应用程序历史记录的持续时间不够长,因此它会返回已使用内核,内存和容器的-1值。



我们想延长持续时间该纱线存储的数据,但我们不知道在哪里设置值。

解决方案

您应该检查您的mapred站点。 xml并查看 mapreduce.jobhistory.max-age-ms 。如以下所述:

https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml a>


在运行历史记录清理器时,将会删除比此毫秒更早的作业历史记录文件。

如果你想读取资源使用情况,你应该考虑使用Job History服务器的Job API和作业计数器API。 RM REST API显示即时使用情况,而不是累计使用情况。



https://hadoop.apache.org/docs/stable/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/ HistoryServerRest.html#Job_API



https://hadoop.apache.org/docs/stable/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/HistoryServerRest。 html#Job_Counters_API


we read resource usage from various users and applications from the Hadoop Resource Manager using the official REST api. Our problem is that the application history does not last long enough so that it returns -1 values for used cores, memory and containers.

We'd like to extend the duration that yarn stores the data but we don't know where to set the value.

解决方案

You should check your mapred-site.xml and look at mapreduce.jobhistory.max-age-ms. As stated in:

https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml

Job history files older than this many milliseconds will be deleted when the history cleaner runs. Defaults to 604800000 (1 week).

If you want to read resource usage, you should consider using the Job History server's Job API and Job Counters API. The RM REST APIs show instantaneous usage not cumulative usage.

https://hadoop.apache.org/docs/stable/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/HistoryServerRest.html#Job_API

https://hadoop.apache.org/docs/stable/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/HistoryServerRest.html#Job_Counters_API

这篇关于Hadoop Resource Manager存储应用程序信息多久?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆