有没有办法确定是否在YARN上触发了抢占机制?
在YARN资源管理器中还是在日志中?
答案 0 :(得分:2)
如果您的日志级别设置为info
,则应该在YARN Resource Manager日志中看到它。
// 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