From e12e470d5fb51b420968a8b09daa24398abd4535 Mon Sep 17 00:00:00 2001 From: Zhihong Yu Date: Sun, 28 Apr 2013 03:12:19 +0000 Subject: [PATCH] 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 --- .../org/apache/hadoop/hbase/metrics/MetricsMBeanBase.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/metrics/MetricsMBeanBase.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/metrics/MetricsMBeanBase.java index cd5c48a84d4..372115baa68 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/metrics/MetricsMBeanBase.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/metrics/MetricsMBeanBase.java @@ -19,9 +19,9 @@ package org.apache.hadoop.hbase.metrics; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import javax.management.AttributeNotFoundException; import javax.management.MBeanAttributeInfo; @@ -57,8 +57,8 @@ public class MetricsMBeanBase extends MetricsDynamicMBeanBase { /** HBase MetricsBase implementations that MetricsDynamicMBeanBase does * not understand */ - protected Map extendedAttributes = - new HashMap(); + protected Map extendedAttributes = + new ConcurrentHashMap(); protected MBeanInfo extendedInfo; protected MetricsMBeanBase( MetricsRegistry mr, String description ) {