HADOOP-7330. Fix MetricsSourceAdapter to use the value instead of the 
object. (Luke Lu via omalley)


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-203@1128115 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/CHANGES.txt b/CHANGES.txt
index 703cad3..5954e8b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,10 @@
 Hadoop Change Log
 
+Release 0.20.203.1 - Unreleased
+
+    HADOOP-7330. Fix MetricsSourceAdapter to use the value instead of the 
+    object. (Luke Lu via omalley)
+
 Release 0.20.203.0 - 2011-5-11
 
     MAPREDUCE-1280. Update Eclipse plugin to the new eclipse.jdt API.
diff --git a/src/core/org/apache/hadoop/metrics2/impl/MetricsSourceAdapter.java b/src/core/org/apache/hadoop/metrics2/impl/MetricsSourceAdapter.java
index ee5070f..088077d 100644
--- a/src/core/org/apache/hadoop/metrics2/impl/MetricsSourceAdapter.java
+++ b/src/core/org/apache/hadoop/metrics2/impl/MetricsSourceAdapter.java
@@ -102,7 +102,7 @@
     if (LOG.isDebugEnabled()) {
       LOG.debug(attribute +": "+ a.getName() +"="+ a.getValue());
     }
-    return a;
+    return a.getValue();
   }
 
   public void setAttribute(Attribute attribute)