【问题标题】:How to know if preemption is happening on Yarn fair share scheduler?如何知道 Yarn fair share scheduler 上是否发生抢占?
【发布时间】:2018-07-13 00:37:24
【问题描述】:

有什么方法可以确定YARN上是否触发了抢占机制?

在 YARN 资源管理器或日志中?

【问题讨论】:

    标签: hadoop hive hadoop-yarn


    【解决方案1】:

    如果您的日志级别设置为info,您应该会在 YARN 资源管理器日志中看到这一点。

                // Warn application about containers to be killed
                for (RMContainer container : containers) {
                  FSAppAttempt app = scheduler.getSchedulerApp(
                          container.getApplicationAttemptId());
                  LOG.info("Preempting container " + container +
                          " from queue " + app.getQueueName());
                  app.trackContainerForPreemption(container);
                }
    

    https://github.com/apache/hadoop/.../scheduler/fair/FSPreemptionThread.java#L143.

    如果您的日志级别为debug,您还会看到:

        if (LOG.isDebugEnabled()) {
          LOG.debug(
              "allocate: post-update" + " applicationAttemptId=" + appAttemptId
                  + " #ask=" + ask.size() + " reservation= " + application
                  .getCurrentReservation());
    
          LOG.debug("Preempting " + preemptionContainerIds.size()
              + " container(s)");
        }
    

    https://github.com/apache/hadoop/.../scheduler/fair/FairScheduler.java#937

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-13
      • 2016-03-15
      • 1970-01-01
      • 2011-06-12
      • 2013-08-21
      • 2015-12-30
      • 2011-04-17
      • 2017-06-11
      相关资源
      最近更新 更多