From 3e3b088856b611ce47e360e1b01b7cd23c65cd67 Mon Sep 17 00:00:00 2001 From: Rohith Sharma K S Date: Tue, 23 Oct 2018 12:58:41 +0530 Subject: [PATCH] YARN-8826. Fix lingering timeline collector after serviceStop in TimelineCollectorManager. Contributed by Prabha Manepalli. (cherry picked from commit 0b62983c5a9361eb832784f134f140f9926c9ec6) --- .../timelineservice/collector/TimelineCollectorManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/collector/TimelineCollectorManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/collector/TimelineCollectorManager.java index 7909a2e82f6..d59b2e072d0 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/collector/TimelineCollectorManager.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/collector/TimelineCollectorManager.java @@ -220,7 +220,7 @@ public class TimelineCollectorManager extends CompositeService { @Override protected void serviceStop() throws Exception { - if (collectors != null && collectors.size() > 1) { + if (collectors != null && collectors.size() > 0) { synchronized (collectors) { for (TimelineCollector c : collectors.values()) { c.serviceStop();