From 39a9dc8e4a6e1d13658867ad756878d3dd6352b0 Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Fri, 25 Aug 2017 15:31:29 -0500 Subject: [PATCH] YARN-7052. RM SchedulingMonitor gives no indication why the spawned thread crashed. Contributed by Eric Payne --- .../server/resourcemanager/monitor/SchedulingMonitor.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/SchedulingMonitor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/SchedulingMonitor.java index 1e3f6914031..631d1a0f835 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/SchedulingMonitor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/SchedulingMonitor.java @@ -100,9 +100,11 @@ public class SchedulingMonitor extends AbstractService { try { //invoke the preemption policy invokePolicy(); - } catch (YarnRuntimeException e) { - LOG.error("YarnRuntimeException raised while executing preemption" - + " checker, skip this run..., exception=", e); + } catch (Throwable t) { + // The preemption monitor does not alter structures nor do structures + // persist across invocations. Therefore, log, skip, and retry. + LOG.error("Exception raised while executing preemption" + + " checker, skip this run..., exception=", t); } } }