【发布时间】:2018-07-13 00:37:24
【问题描述】:
有什么方法可以确定YARN上是否触发了抢占机制?
在 YARN 资源管理器或日志中?
【问题讨论】:
标签: hadoop hive hadoop-yarn
有什么方法可以确定YARN上是否触发了抢占机制?
在 YARN 资源管理器或日志中?
【问题讨论】:
标签: hadoop hive hadoop-yarn
如果您的日志级别设置为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
【讨论】: