Avoid ConcurrentModificationException of LocalBrokerData.
Fixes
### Motivation
Avoid ConcurrentModificationException of LocalBrokerData. The root cause is the `updateLocalBrokerData` method in the ModularLoadManagerImpl update the `lastStats` in the LocalBrokerData to a HashMap, it should be a concurrent map.
@@ -69,7 +69,7 @@ public class PulsarStats implements Closeable {
this.nsStats = new NamespaceStats();
this.clusterReplicationMetrics = new ClusterReplicationMetrics(pulsar.getConfiguration().getClusterName(),
pulsar.getConfiguration().isReplicationMetricsEnabled());
- this.bundleStats = Maps.newHashMap();
+ this.bundleStats = Maps.newConcurrentMap();
this.tempMetricsCollection = Lists.newArrayList();
this.metricsCollection = Lists.newArrayList();
this.brokerOperabilityMetrics = new BrokerOperabilityMetrics(pulsar.getConfiguration().getClusterName(),
