gpt4 book ai didi

hadoop - yarn [hadoop 2.2] location mapper or reducer log输出到哪里?

转载 作者:可可西里 更新时间:2023-11-01 15:02:50 24 4
gpt4 key购买 nike

我想查看log mapper或者reducer输出?在container foler下的syslog中找不到?那么log输出到哪里呢?

        public class SkipStat {
private static Log log = LogFactory.getLog(SkipStat.class);

private static BlockWorkerRepository blockWorkerRepository;
static {
blockWorkerRepository = new BlockWorkerRepositoryImpl();
}

private static class SkipInfoMapper extends Mapper<Object, BSONObject, Text, AssignmentWritable> {

private final String invalidResult = "^";

private static final Calendar currentCalendar = Calendar.getInstance();
static {
currentCalendar.add(Calendar.HOUR, -24);
}

protected void map(Object key, BSONObject value, Context context) throws IOException, InterruptedException {
String result = (String) value.get("result");
log.info("lol... get one result " + result); // LOG ...
if (invalidResult.equals(result)) {

最佳答案

要启用日志聚合,然后允许您运行“yarn logs”命令来查看应用程序 ID 的日志,请在您的 yarn-site.xml 中设置这些:

yarn.log-aggregation-enable
yarn.log-aggregation.retain-seconds
yarn.log-aggregation.retain-check-interval-seconds

似乎有必要在进行此更改后重新启动 yarn。

请注意注释中引用的命令将在启用聚合后起作用:

yarn logs -applicationId application_1397033985470_0006

参见:http://hadoop.apache.org/docs/r2.2.0/hadoop-yarn/hadoop-yarn-common/yarn-default.xml

2.3.0 文档中提供了这些参数的说明:http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-common/yarn-default.xml

关于hadoop - yarn [hadoop 2.2] location mapper or reducer log输出到哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22956822/

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