YARN-6563 ConcurrentModificationException in TimelineCollectorManager while stopping RM (Contributed by Haibo Chen via Vrushali C)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f07a97c1 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f07a97c1 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f07a97c1 Branch: refs/heads/YARN-5355_branch2 Commit: f07a97c1afcd4ee049b4b2af0163221800946a1a Parents: ab20af1 Author: Vrushali Channapattan <[email protected]> Authored: Tue May 9 11:15:24 2017 -0700 Committer: Vrushali Channapattan <[email protected]> Committed: Tue May 9 11:15:24 2017 -0700 ---------------------------------------------------------------------- .../timelineservice/collector/TimelineCollectorManager.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/f07a97c1/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 8ef9b43..07cbb2b 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 @@ -219,8 +219,10 @@ public class TimelineCollectorManager extends AbstractService { @Override protected void serviceStop() throws Exception { if (collectors != null && collectors.size() > 1) { - for (TimelineCollector c : collectors.values()) { - c.serviceStop(); + synchronized (collectors) { + for (TimelineCollector c : collectors.values()) { + c.serviceStop(); + } } } // stop the flusher first --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
