Browse Source

YARN-8826. Fix lingering timeline collector after serviceStop in TimelineCollectorManager. Contributed by Prabha Manepalli.

(cherry picked from commit 0b62983c5a9361eb832784f134f140f9926c9ec6)
Rohith Sharma K S 6 years ago
parent
commit
660fff3138

+ 1 - 1
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();