HADOOP-9504. MetricsDynamicMBeanBase has concurrency issues in createMBeanInfo. Contributed by Liang Xie
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1476487 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
75b4231a8c
commit
fc45cbf8df
|
@ -644,6 +644,9 @@ Release 2.0.5-beta - UNRELEASED
|
|||
|
||||
HADOOP-9473. Typo in FileUtil copy() method. (Glen Mazza via suresh)
|
||||
|
||||
HADOOP-9504. MetricsDynamicMBeanBase has concurrency issues in
|
||||
createMBeanInfo (Liang Xie via jlowe)
|
||||
|
||||
Release 2.0.4-alpha - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -1657,6 +1660,9 @@ Release 0.23.8 - UNRELEASED
|
|||
HADOOP-9469. mapreduce/yarn source jars not included in dist tarball
|
||||
(Robert Parker via tgraves)
|
||||
|
||||
HADOOP-9504. MetricsDynamicMBeanBase has concurrency issues in
|
||||
createMBeanInfo (Liang Xie via jlowe)
|
||||
|
||||
Release 0.23.7 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
package org.apache.hadoop.metrics.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import javax.management.Attribute;
|
||||
import javax.management.AttributeList;
|
||||
|
@ -69,6 +69,7 @@ public abstract class MetricsDynamicMBeanBase implements DynamicMBean {
|
|||
protected MetricsDynamicMBeanBase(final MetricsRegistry mr, final String aMBeanDescription) {
|
||||
metricsRegistry = mr;
|
||||
mbeanDescription = aMBeanDescription;
|
||||
metricsRateAttributeMod = new ConcurrentHashMap<String, MetricsBase>();
|
||||
createMBeanInfo();
|
||||
}
|
||||
|
||||
|
@ -78,7 +79,6 @@ public abstract class MetricsDynamicMBeanBase implements DynamicMBean {
|
|||
}
|
||||
|
||||
private void createMBeanInfo() {
|
||||
metricsRateAttributeMod = new HashMap<String, MetricsBase>();
|
||||
boolean needsMinMaxResetOperation = false;
|
||||
List<MBeanAttributeInfo> attributesInfo = new ArrayList<MBeanAttributeInfo>();
|
||||
MBeanOperationInfo[] operationsInfo = null;
|
||||
|
|
Loading…
Reference in New Issue