YARN-6563 ConcurrentModificationException in TimelineCollectorManager while stopping RM (Contributed by Haibo Chen via Vrushali C)
This commit is contained in:
parent
45382bf047
commit
7dd258d8f4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue