Author: cmccabe
Date: Sat Nov 2 18:55:56 2013
New Revision: 1538253
URL: http://svn.apache.org/r1538253
Log:
HADOOP-9478. Fix race conditions during the initialization of Configuration
related to deprecatedKeyMap (cmccabe)
Modified:
hadoop/common/branches/branch-2.2/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java
hadoop/common/branches/branch-2.2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/DistributedCacheEmulator.java
Modified:
hadoop/common/branches/branch-2.2/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.2/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java?rev=1538253&r1=1538252&r2=1538253&view=diff
==============================================================================
---
hadoop/common/branches/branch-2.2/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java
(original)
+++
hadoop/common/branches/branch-2.2/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java
Sat Nov 2 18:55:56 2013
@@ -29,6 +29,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configurable;
import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.conf.Configuration.DeprecationDelta;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
@@ -71,11 +72,12 @@ public class Logalyzer {
"logalizer.logcomparator.column.separator";
static {
- Configuration.addDeprecation("mapred.reducer.sort",
- new String[] {SORT_COLUMNS});
- Configuration.addDeprecation("mapred.reducer.separator",
- new String[] {COLUMN_SEPARATOR});
+ Configuration.addDeprecations(new DeprecationDelta[] {
+ new DeprecationDelta("mapred.reducer.sort", SORT_COLUMNS),
+ new DeprecationDelta("mapred.reducer.separator", COLUMN_SEPARATOR)
+ });
}
+
/** A {@link Mapper} that extracts text matching a regular expression. */
public static class LogRegexMapper<K extends WritableComparable>
extends MapReduceBase
Modified:
hadoop/common/branches/branch-2.2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/DistributedCacheEmulator.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/DistributedCacheEmulator.java?rev=1538253&r1=1538252&r2=1538253&view=diff
==============================================================================
---
hadoop/common/branches/branch-2.2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/DistributedCacheEmulator.java
(original)
+++
hadoop/common/branches/branch-2.2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/DistributedCacheEmulator.java
Sat Nov 2 18:55:56 2013
@@ -23,6 +23,7 @@ import org.apache.commons.logging.LogFac
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.conf.Configuration.DeprecationDelta;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.permission.FsAction;
@@ -118,10 +119,12 @@ class DistributedCacheEmulator {
{
// Need to handle deprecation of these MapReduce-internal configuration
// properties as MapReduce doesn't handle their deprecation.
- Configuration.addDeprecation("mapred.cache.files.filesizes",
- new String[] {MRJobConfig.CACHE_FILES_SIZES});
- Configuration.addDeprecation("mapred.cache.files.visibilities",
- new String[] {MRJobConfig.CACHE_FILE_VISIBILITIES});
+ Configuration.addDeprecations(new DeprecationDelta[] {
+ new DeprecationDelta("mapred.cache.files.filesizes",
+ MRJobConfig.CACHE_FILES_SIZES),
+ new DeprecationDelta("mapred.cache.files.visibilities",
+ MRJobConfig.CACHE_FILE_VISIBILITIES)
+ });
}
/**