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

(cherry picked from commit 0b62983c5a9361eb832784f134f140f9926c9ec6)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/b32ef142
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b32ef142
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b32ef142

Branch: refs/heads/branch-2-jhung-test
Commit: b32ef1429f384af5c6f278c934d511c8875f354d
Parents: 0c39681
Author: Rohith Sharma K S <[email protected]>
Authored: Tue Oct 23 12:58:41 2018 +0530
Committer: Jonathan Hung <[email protected]>
Committed: Fri Dec 14 16:03:55 2018 -0800

----------------------------------------------------------------------
 .../server/timelineservice/collector/TimelineCollectorManager.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b32ef142/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/collector/TimelineCollectorManager.java
----------------------------------------------------------------------
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 c64a3ad..9727850 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
@@ -221,7 +221,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();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to