diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 37d533c70e3..1c72e1fbe51 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -174,6 +174,10 @@ Release 0.23.2 - UNRELEASED MAPREDUCE-3910. Fixed a bug in CapacityScheduler LeafQueue which was causing app-submission to fail. (John George via vinodkv) + + MAPREDUCE-3686. Fixed two bugs in Counters because of which web app displays + zero counter values for framework counters. (Bhallamudi Venkata Siva Kamesh + via vinodkv) Release 0.23.1 - 2012-02-17 diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java index 73434ae9bdb..768f1c782e9 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java @@ -326,12 +326,10 @@ public abstract class AbstractCounters other) { for(G right : other) { - G left = groups.get(right.getName()); + String groupName = right.getName(); + G left = (isFrameworkGroup(groupName) ? fgroups : groups).get(groupName); if (left == null) { - limits.checkGroups(groups.size() + 1); - left = groupFactory.newGroup(right.getName(), right.getDisplayName(), - limits); - groups.put(right.getName(), left); + left = addGroup(groupName, right.getDisplayName()); } left.incrAllCounters(right); } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/CounterGroupFactory.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/CounterGroupFactory.java index a402f741085..7f392f2cb5d 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/CounterGroupFactory.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/CounterGroupFactory.java @@ -107,6 +107,8 @@ public abstract class CounterGroupFactory FRAMEWORK_COUNTER = TaskCounter.CPU_MILLISECONDS; static final long FRAMEWORK_COUNTER_VALUE = 8;