YARN-6563 ConcurrentModificationException in TimelineCollectorManager while stopping RM (Contributed by Haibo Chen via Vrushali C)
This commit is contained in:
parent
34570d4fc3
commit
70315de4ff
|
@ -219,10 +219,12 @@ public class TimelineCollectorManager extends AbstractService {
|
||||||
@Override
|
@Override
|
||||||
protected void serviceStop() throws Exception {
|
protected void serviceStop() throws Exception {
|
||||||
if (collectors != null && collectors.size() > 1) {
|
if (collectors != null && collectors.size() > 1) {
|
||||||
|
synchronized (collectors) {
|
||||||
for (TimelineCollector c : collectors.values()) {
|
for (TimelineCollector c : collectors.values()) {
|
||||||
c.serviceStop();
|
c.serviceStop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// stop the flusher first
|
// stop the flusher first
|
||||||
if (writerFlusher != null) {
|
if (writerFlusher != null) {
|
||||||
writerFlusher.shutdown();
|
writerFlusher.shutdown();
|
||||||
|
|
Loading…
Reference in New Issue