YARN-6563 ConcurrentModificationException in TimelineCollectorManager while stopping RM (Contributed by Haibo Chen via Vrushali C)
This commit is contained in:
parent
a36e041f5f
commit
ae743ff258
|
@ -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