From 2f1a133dcf8dc9e629a5c2829b1a116d66db4944 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 30 Aug 2012 17:12:14 +0000 Subject: [PATCH] MAPREDUCE-4610. Support deprecated mapreduce.job.counters.limit property in MR2. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1379022 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/mapreduce/counters/Limits.java | 4 +++- .../java/org/apache/hadoop/mapreduce/util/ConfigUtil.java | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index b6ff5808a7e..72786c396fa 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -187,6 +187,9 @@ Branch-2 ( Unreleased changes ) MAPREDUCE-4608. hadoop-mapreduce-client is missing some dependencies. (tucu via tomwhite) + MAPREDUCE-4610. Support deprecated mapreduce.job.counters.limit property in + MR2. (tomwhite) + Release 2.1.0-alpha - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/Limits.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/Limits.java index d22ac7011a8..b82ebc65dce 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/Limits.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/Limits.java @@ -20,12 +20,14 @@ package org.apache.hadoop.mapreduce.counters; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.mapred.JobConf; + import static org.apache.hadoop.mapreduce.MRJobConfig.*; @InterfaceAudience.Private public class Limits { - static final Configuration conf = new Configuration(); + static final Configuration conf = new JobConf(); public static final int GROUP_NAME_MAX = conf.getInt(COUNTER_GROUP_NAME_MAX_KEY, COUNTER_GROUP_NAME_MAX_DEFAULT); public static final int COUNTER_NAME_MAX = diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/util/ConfigUtil.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/util/ConfigUtil.java index f5dbc3a7f1a..dbbd786edfc 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/util/ConfigUtil.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/util/ConfigUtil.java @@ -376,6 +376,8 @@ public class ConfigUtil { new String[] {MRJobConfig.REDUCE_SKIP_MAXGROUPS}); Configuration.addDeprecation("mapred.reduce.child.log.level", new String[] {MRJobConfig.REDUCE_LOG_LEVEL}); + Configuration.addDeprecation("mapreduce.job.counters.limit", + new String[] {MRJobConfig.COUNTERS_MAX_KEY}); Configuration.addDeprecation("jobclient.completion.poll.interval", new String[] {Job.COMPLETION_POLL_INTERVAL_KEY}); Configuration.addDeprecation("jobclient.progress.monitor.poll.interval",