hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1500339 - in /hadoop/common/branches/branch-1: CHANGES.txt src/core/org/apache/hadoop/metrics/util/MetricsDynamicMBeanBase.java
Date Sat, 06 Jul 2013 23:07:37 GMT
Author: mattf
Date: Sat Jul  6 23:07:36 2013
New Revision: 1500339

URL: http://svn.apache.org/r1500339
Log:
HADOOP-9504 MetricsDynamicMBeanBase has concurrency issues in createMBeanInfo. Contributed
by Liang Xie and Jason Lowe.

Modified:
    hadoop/common/branches/branch-1/CHANGES.txt   (contents, props changed)
    hadoop/common/branches/branch-1/src/core/org/apache/hadoop/metrics/util/MetricsDynamicMBeanBase.java

Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1500339&r1=1500338&r2=1500339&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Sat Jul  6 23:07:36 2013
@@ -84,6 +84,9 @@ Release 1.2.1 - Unreleased 
 
   BUG FIXES
 
+    HADOOP-9504 MetricsDynamicMBeanBase has concurrency issues in createMBeanInfo. 
+    (Liang Xie and Jason Lowe, via mattf)
+
     MAPREDUCE-5206. Ensure that a job doesn't get added to RetiredJobs
     multiple times in JobTracker. (acmurthy)
 

Propchange: hadoop/common/branches/branch-1/CHANGES.txt
------------------------------------------------------------------------------
  Merged /hadoop/common/branches/branch-1.2/CHANGES.txt:r1500337

Modified: hadoop/common/branches/branch-1/src/core/org/apache/hadoop/metrics/util/MetricsDynamicMBeanBase.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/core/org/apache/hadoop/metrics/util/MetricsDynamicMBeanBase.java?rev=1500339&r1=1500338&r2=1500339&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/core/org/apache/hadoop/metrics/util/MetricsDynamicMBeanBase.java
(original)
+++ hadoop/common/branches/branch-1/src/core/org/apache/hadoop/metrics/util/MetricsDynamicMBeanBase.java
Sat Jul  6 23:07:36 2013
@@ -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;
@@ -70,6 +70,7 @@ public abstract class MetricsDynamicMBea
   protected MetricsDynamicMBeanBase(final MetricsRegistry mr, final String aMBeanDescription)
{
     metricsRegistry = mr;
     mbeanDescription = aMBeanDescription;
+    metricsRateAttributeMod = new ConcurrentHashMap<String, MetricsBase>();
     createMBeanInfo();
   }
   
@@ -79,7 +80,6 @@ public abstract class MetricsDynamicMBea
   }
   
   private void createMBeanInfo() {
-    metricsRateAttributeMod = new HashMap<String, MetricsBase>();
     boolean needsMinMaxResetOperation = false;
     List<MBeanAttributeInfo> attributesInfo = new ArrayList<MBeanAttributeInfo>();
     MBeanOperationInfo[] operationsInfo = null;



Mime
View raw message