HBASE-8451 MetricsMBeanBase has concurrency issues in init (Liang Xie)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1476713 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2013-04-28 03:12:19 +00:00
parent 4e28bd8bab
commit e12e470d5f
1 changed files with 3 additions and 3 deletions

View File

@ -19,9 +19,9 @@
package org.apache.hadoop.hbase.metrics; package org.apache.hadoop.hbase.metrics;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import javax.management.AttributeNotFoundException; import javax.management.AttributeNotFoundException;
import javax.management.MBeanAttributeInfo; import javax.management.MBeanAttributeInfo;
@ -57,8 +57,8 @@ public class MetricsMBeanBase extends MetricsDynamicMBeanBase {
/** HBase MetricsBase implementations that MetricsDynamicMBeanBase does /** HBase MetricsBase implementations that MetricsDynamicMBeanBase does
* not understand * not understand
*/ */
protected Map<String,MetricsBase> extendedAttributes = protected Map<String, MetricsBase> extendedAttributes =
new HashMap<String,MetricsBase>(); new ConcurrentHashMap<String, MetricsBase>();
protected MBeanInfo extendedInfo; protected MBeanInfo extendedInfo;
protected MetricsMBeanBase( MetricsRegistry mr, String description ) { protected MetricsMBeanBase( MetricsRegistry mr, String description ) {