hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aajis...@apache.org
Subject hadoop git commit: MAPREDUCE-5800. Use Job#getInstance instead of deprecated constructors. (aajisaka)
Date Tue, 03 Feb 2015 22:38:35 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 c981b040b -> 8d98e5c96


MAPREDUCE-5800. Use Job#getInstance instead of deprecated constructors. (aajisaka)

(cherry picked from commit bd69fb2d44403e930d1fc0868ed1dd2a49dd9659)

Conflicts:
	hadoop-tools/hadoop-streaming/src/test/java/org/apache/hadoop/streaming/mapreduce/TestStreamXmlRecordReader.java


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8d98e5c9
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8d98e5c9
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8d98e5c9

Branch: refs/heads/branch-2
Commit: 8d98e5c960ded581fd9841db9acd18a28a391857
Parents: c981b04
Author: Akira Ajisaka <aajisaka@apache.org>
Authored: Tue Feb 3 14:30:09 2015 -0800
Committer: Akira Ajisaka <aajisaka@apache.org>
Committed: Tue Feb 3 14:35:15 2015 -0800

----------------------------------------------------------------------
 hadoop-mapreduce-project/CHANGES.txt                           | 3 +++
 .../src/main/java/org/apache/hadoop/mapred/jobcontrol/Job.java | 4 ++--
 .../org/apache/hadoop/mapred/lib/CombineFileInputFormat.java   | 4 ++--
 .../main/java/org/apache/hadoop/mapred/lib/InputSampler.java   | 2 +-
 .../java/org/apache/hadoop/mapred/lib/db/DBInputFormat.java    | 2 +-
 .../src/main/java/org/apache/hadoop/mapreduce/Job.java         | 4 ++--
 .../hadoop/mapreduce/lib/aggregate/ValueAggregatorJob.java     | 2 +-
 .../hadoop/mapreduce/lib/input/DelegatingInputFormat.java      | 2 +-
 .../apache/hadoop/mapreduce/lib/jobcontrol/ControlledJob.java  | 2 +-
 .../main/java/org/apache/hadoop/mapreduce/lib/join/Parser.java | 2 +-
 .../apache/hadoop/mapreduce/lib/output/MultipleOutputs.java    | 2 +-
 .../apache/hadoop/mapreduce/lib/partition/InputSampler.java    | 2 +-
 .../hadoop/mapreduce/lib/partition/TotalOrderPartitioner.java  | 2 +-
 .../src/test/java/org/apache/hadoop/RandomTextWriterJob.java   | 2 +-
 .../java/org/apache/hadoop/mapred/TestMiniMRChildTask.java     | 4 ++--
 .../java/org/apache/hadoop/mapred/TestMiniMRClientCluster.java | 2 +-
 .../src/test/java/org/apache/hadoop/mapreduce/LargeSorter.java | 3 +--
 .../java/org/apache/hadoop/mapreduce/RandomTextWriter.java     | 2 +-
 .../test/java/org/apache/hadoop/mapreduce/RandomWriter.java    | 2 +-
 .../test/java/org/apache/hadoop/mapreduce/v2/TestMRJobs.java   | 2 +-
 .../src/test/java/testjar/UserNamePermission.java              | 2 +-
 .../java/org/apache/hadoop/examples/BaileyBorweinPlouffe.java  | 2 +-
 .../src/main/java/org/apache/hadoop/examples/Grep.java         | 4 ++--
 .../src/main/java/org/apache/hadoop/examples/Join.java         | 2 +-
 .../java/org/apache/hadoop/examples/MultiFileWordCount.java    | 2 +-
 .../main/java/org/apache/hadoop/examples/QuasiMonteCarlo.java  | 2 +-
 .../main/java/org/apache/hadoop/examples/RandomTextWriter.java | 2 +-
 .../src/main/java/org/apache/hadoop/examples/RandomWriter.java | 2 +-
 .../main/java/org/apache/hadoop/examples/SecondarySort.java    | 2 +-
 .../src/main/java/org/apache/hadoop/examples/Sort.java         | 2 +-
 .../src/main/java/org/apache/hadoop/examples/WordCount.java    | 2 +-
 .../src/main/java/org/apache/hadoop/examples/WordMean.java     | 3 +--
 .../src/main/java/org/apache/hadoop/examples/WordMedian.java   | 3 +--
 .../java/org/apache/hadoop/examples/WordStandardDeviation.java | 3 +--
 .../apache/hadoop/examples/dancing/DistributedPentomino.java   | 2 +-
 .../src/main/java/org/apache/hadoop/examples/pi/DistSum.java   | 3 ++-
 .../main/java/org/apache/hadoop/mapred/gridmix/GridmixJob.java | 6 +++---
 .../hadoop/mapred/gridmix/TestCompressionEmulationUtils.java   | 2 +-
 38 files changed, 48 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt
index 3ba94bb..95f2152 100644
--- a/hadoop-mapreduce-project/CHANGES.txt
+++ b/hadoop-mapreduce-project/CHANGES.txt
@@ -39,6 +39,9 @@ Release 2.7.0 - UNRELEASED
     MAPREDUCE-6143. add configuration for mapreduce speculative execution in
     MR2 (zxu via rkanter)
 
+    MAPREDUCE-5800. Use Job#getInstance instead of deprecated constructors
+    (aajisaka)
+
   OPTIMIZATIONS
 
     MAPREDUCE-6169. MergeQueue should release reference to the current item 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/jobcontrol/Job.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/jobcontrol/Job.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/jobcontrol/Job.java
index dba17b9..e79ab87 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/jobcontrol/Job.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/jobcontrol/Job.java
@@ -51,7 +51,7 @@ public class Job extends ControlledJob {
    */
   @SuppressWarnings("unchecked")
   public Job(JobConf jobConf, ArrayList<?> dependingJobs) throws IOException {
-    super(new org.apache.hadoop.mapreduce.Job(jobConf), 
+    super(org.apache.hadoop.mapreduce.Job.getInstance(jobConf),
           (List<ControlledJob>) dependingJobs);
   }
 
@@ -93,7 +93,7 @@ public class Job extends ControlledJob {
    */
   public synchronized void setJobConf(JobConf jobConf) {
     try {
-      super.setJob(new org.apache.hadoop.mapreduce.Job(jobConf));
+      super.setJob(org.apache.hadoop.mapreduce.Job.getInstance(jobConf));
     } catch (IOException ioe) { 
       LOG.info("Exception" + ioe);
     }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/CombineFileInputFormat.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/CombineFileInputFormat.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/CombineFileInputFormat.java
index b9297f8..da1db70 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/CombineFileInputFormat.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/CombineFileInputFormat.java
@@ -73,7 +73,7 @@ public abstract class CombineFileInputFormat<K, V>
   public InputSplit[] getSplits(JobConf job, int numSplits) 
     throws IOException {
     List<org.apache.hadoop.mapreduce.InputSplit> newStyleSplits =
-      super.getSplits(new Job(job));
+      super.getSplits(Job.getInstance(job));
     InputSplit[] ret = new InputSplit[newStyleSplits.size()];
     for(int pos = 0; pos < newStyleSplits.size(); ++pos) {
       org.apache.hadoop.mapreduce.lib.input.CombineFileSplit newStyleSplit = 
@@ -129,7 +129,7 @@ public abstract class CombineFileInputFormat<K, V>
    * @throws IOException if zero items.
    */
   protected FileStatus[] listStatus(JobConf job) throws IOException {
-    List<FileStatus> result = super.listStatus(new Job(job));
+    List<FileStatus> result = super.listStatus(Job.getInstance(job));
     return result.toArray(new FileStatus[result.size()]);
   }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/InputSampler.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/InputSampler.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/InputSampler.java
index a55abe6..d378bca 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/InputSampler.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/InputSampler.java
@@ -46,7 +46,7 @@ public class InputSampler<K,V> extends
 
   public static <K,V> void writePartitionFile(JobConf job, Sampler<K,V> sampler)
       throws IOException, ClassNotFoundException, InterruptedException {
-    writePartitionFile(new Job(job), sampler);
+    writePartitionFile(Job.getInstance(job), sampler);
   }
   /**
    * Interface to sample using an {@link org.apache.hadoop.mapred.InputFormat}.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/db/DBInputFormat.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/db/DBInputFormat.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/db/DBInputFormat.java
index 9b32530..2715705 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/db/DBInputFormat.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/db/DBInputFormat.java
@@ -177,7 +177,7 @@ public class DBInputFormat<T  extends DBWritable>
   /** {@inheritDoc} */
   public InputSplit[] getSplits(JobConf job, int chunks) throws IOException {
     List<org.apache.hadoop.mapreduce.InputSplit> newSplits = 
-      super.getSplits(new Job(job));
+      super.getSplits(Job.getInstance(job));
     InputSplit[] ret = new InputSplit[newSplits.size()];
     int i = 0;
     for (org.apache.hadoop.mapreduce.InputSplit s : newSplits) {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Job.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Job.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Job.java
index cfc3437..493ca5f 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Job.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Job.java
@@ -120,7 +120,7 @@ public class Job extends JobContextImpl implements JobContext {
    */
   @Deprecated
   public Job() throws IOException {
-    this(new Configuration());
+    this(new JobConf(new Configuration()));
   }
 
   /**
@@ -136,7 +136,7 @@ public class Job extends JobContextImpl implements JobContext {
    */
   @Deprecated
   public Job(Configuration conf, String jobName) throws IOException {
-    this(conf);
+    this(new JobConf(conf));
     setJobName(jobName);
   }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/aggregate/ValueAggregatorJob.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/aggregate/ValueAggregatorJob.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/aggregate/ValueAggregatorJob.java
index 9242c82..d8833da 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/aggregate/ValueAggregatorJob.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/aggregate/ValueAggregatorJob.java
@@ -164,7 +164,7 @@ public class ValueAggregatorJob {
       conf.set(MRJobConfig.JAR, userJarFile);
     }
 
-    Job theJob = new Job(conf);
+    Job theJob = Job.getInstance(conf);
     if (userJarFile == null) {
       theJob.setJarByClass(ValueAggregator.class);
     } 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/DelegatingInputFormat.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/DelegatingInputFormat.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/DelegatingInputFormat.java
index 964419c..35f1805 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/DelegatingInputFormat.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/DelegatingInputFormat.java
@@ -53,7 +53,7 @@ public class DelegatingInputFormat<K, V> extends InputFormat<K, V> {
   public List<InputSplit> getSplits(JobContext job) 
       throws IOException, InterruptedException {
     Configuration conf = job.getConfiguration();
-    Job jobCopy =new Job(conf);
+    Job jobCopy = Job.getInstance(conf);
     List<InputSplit> splits = new ArrayList<InputSplit>();
     Map<Path, InputFormat> formatMap = 
       MultipleInputs.getInputFormatMap(job);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/jobcontrol/ControlledJob.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/jobcontrol/ControlledJob.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/jobcontrol/ControlledJob.java
index f16092e..4d5be68 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/jobcontrol/ControlledJob.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/jobcontrol/ControlledJob.java
@@ -84,7 +84,7 @@ public class ControlledJob {
    * @throws IOException
    */
   public ControlledJob(Configuration conf) throws IOException {
-    this(new Job(conf), null);
+    this(Job.getInstance(conf), null);
   }
 	
   @Override

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/join/Parser.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/join/Parser.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/join/Parser.java
index 275272b..c557e14 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/join/Parser.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/join/Parser.java
@@ -323,7 +323,7 @@ public abstract static class Node extends ComposableInputFormat {
     }
 
     private Configuration getConf(Configuration jconf) throws IOException {
-      Job job = new Job(jconf);
+      Job job = Job.getInstance(jconf);
       FileInputFormat.setInputPaths(job, indir);
       return job.getConfiguration();
     }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/output/MultipleOutputs.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/output/MultipleOutputs.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/output/MultipleOutputs.java
index 7974b78..24baa59 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/output/MultipleOutputs.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/output/MultipleOutputs.java
@@ -503,7 +503,7 @@ public class MultipleOutputs<KEYOUT, VALUEOUT> {
     
     // The following trick leverages the instantiation of a record writer via
     // the job thus supporting arbitrary output formats.
-    Job job = new Job(context.getConfiguration());
+    Job job = Job.getInstance(context.getConfiguration());
     job.setOutputFormatClass(getNamedOutputFormatClass(context, nameOutput));
     job.setOutputKeyClass(getNamedOutputKeyClass(context, nameOutput));
     job.setOutputValueClass(getNamedOutputValueClass(context, nameOutput));

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/partition/InputSampler.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/partition/InputSampler.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/partition/InputSampler.java
index e709a28..4668f49 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/partition/InputSampler.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/partition/InputSampler.java
@@ -348,7 +348,7 @@ public class InputSampler<K,V> extends Configured implements Tool  {
    * Configures a JobConf instance and calls {@link #writePartitionFile}.
    */
   public int run(String[] args) throws Exception {
-    Job job = new Job(getConf());
+    Job job = Job.getInstance(getConf());
     ArrayList<String> otherArgs = new ArrayList<String>();
     Sampler<K,V> sampler = null;
     for(int i=0; i < args.length; ++i) {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/partition/TotalOrderPartitioner.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/partition/TotalOrderPartitioner.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/partition/TotalOrderPartitioner.java
index fa12976..b5f7846 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/partition/TotalOrderPartitioner.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/partition/TotalOrderPartitioner.java
@@ -83,7 +83,7 @@ public class TotalOrderPartitioner<K extends WritableComparable<?>,V>
         ? FileSystem.getLocal(conf)     // assume in DistributedCache
         : partFile.getFileSystem(conf);
 
-      Job job = new Job(conf);
+      Job job = Job.getInstance(conf);
       Class<K> keyClass = (Class<K>)job.getMapOutputKeyClass();
       K[] splitPoints = readPartitions(fs, partFile, keyClass, conf);
       if (splitPoints.length != job.getNumReduceTasks() - 1) {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/RandomTextWriterJob.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/RandomTextWriterJob.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/RandomTextWriterJob.java
index 8d357cb..2d341e9 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/RandomTextWriterJob.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/RandomTextWriterJob.java
@@ -65,7 +65,7 @@ public class RandomTextWriterJob extends Configured implements Tool {
     }
     conf.setInt(MRJobConfig.NUM_MAPS, numMaps);
 
-    Job job = new Job(conf);
+    Job job = Job.getInstance(conf);
 
     job.setJarByClass(RandomTextWriterJob.class);
     job.setJobName("random-text-writer");

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestMiniMRChildTask.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestMiniMRChildTask.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestMiniMRChildTask.java
index 6dc1e29..59aa00f 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestMiniMRChildTask.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestMiniMRChildTask.java
@@ -185,7 +185,7 @@ public class TestMiniMRChildTask {
     
     // Launch job with default option for temp dir. 
     // i.e. temp dir is ./tmp 
-    Job job = new Job(conf);
+    Job job = Job.getInstance(conf);
     job.addFileToClassPath(APP_JAR);
     job.setJarByClass(TestMiniMRChildTask.class);
     job.setMaxMapAttempts(1); // speed up failures
@@ -537,7 +537,7 @@ public class TestMiniMRChildTask {
     conf.set(mapTaskJavaOptsKey, mapTaskJavaOpts);
     conf.set(reduceTaskJavaOptsKey, reduceTaskJavaOpts);
 
-    Job job = new Job(conf);
+    Job job = Job.getInstance(conf);
     job.addFileToClassPath(APP_JAR);
     job.setJarByClass(TestMiniMRChildTask.class);
     job.setMaxMapAttempts(1); // speed up failures

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestMiniMRClientCluster.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestMiniMRClientCluster.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestMiniMRClientCluster.java
index d988c08..7630d18 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestMiniMRClientCluster.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestMiniMRClientCluster.java
@@ -187,7 +187,7 @@ public class TestMiniMRClientCluster {
   }
 
   public static Job createJob() throws IOException {
-    final Job baseJob = new Job(mrCluster.getConfig());
+    final Job baseJob = Job.getInstance(mrCluster.getConfig());
     baseJob.setOutputKeyClass(Text.class);
     baseJob.setOutputValueClass(IntWritable.class);
     baseJob.setMapperClass(MyMapper.class);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/LargeSorter.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/LargeSorter.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/LargeSorter.java
index c5be446..d6d0339 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/LargeSorter.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/LargeSorter.java
@@ -231,8 +231,7 @@ public class LargeSorter extends Configured implements Tool {
     conf.setInt(MRJobConfig.MAP_MEMORY_MB, mapMb);
     conf.set(MRJobConfig.MAP_JAVA_OPTS, "-Xmx" + (mapMb - 200) + "m");
 
-    @SuppressWarnings("deprecation")
-    Job job = new Job(conf);
+    Job job = Job.getInstance(conf);
     job.setJarByClass(LargeSorter.class);
     job.setJobName("large-sorter");
     FileOutputFormat.setOutputPath(job, outDir);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/RandomTextWriter.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/RandomTextWriter.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/RandomTextWriter.java
index eb35704..40e101a 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/RandomTextWriter.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/RandomTextWriter.java
@@ -195,7 +195,7 @@ public class RandomTextWriter extends Configured implements Tool {
     }
     conf.setInt(MRJobConfig.NUM_MAPS, numMaps);
     
-    Job job = new Job(conf);
+    Job job = Job.getInstance(conf);
     
     job.setJarByClass(RandomTextWriter.class);
     job.setJobName("random-text-writer");

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/RandomWriter.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/RandomWriter.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/RandomWriter.java
index def9e54..a326c8c 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/RandomWriter.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/RandomWriter.java
@@ -261,7 +261,7 @@ public class RandomWriter extends Configured implements Tool {
     }
     conf.setInt(MRJobConfig.NUM_MAPS, numMaps);
 
-    Job job = new Job(conf);
+    Job job = Job.getInstance(conf);
     
     job.setJarByClass(RandomWriter.class);
     job.setJobName("random-writer");

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobs.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobs.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobs.java
index 2b45049..60e5638 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobs.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobs.java
@@ -547,7 +547,7 @@ public class TestMRJobs {
     myConf.setInt(MRJobConfig.NUM_MAPS, 1);
     myConf.setInt(MRJobConfig.MAP_MAX_ATTEMPTS, 2); //reduce the number of attempts
 
-    Job job = new Job(myConf);
+    Job job = Job.getInstance(myConf);
 
     job.setJarByClass(FailingMapper.class);
     job.setJobName("failmapper");

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/testjar/UserNamePermission.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/testjar/UserNamePermission.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/testjar/UserNamePermission.java
index 9ba3b77..8ca2e16 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/testjar/UserNamePermission.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/testjar/UserNamePermission.java
@@ -77,7 +77,7 @@ public  class UserNamePermission
   {
     Path outDir = new Path("output");
     Configuration conf = new Configuration();
-    Job job = new Job(conf, "user name check"); 
+    Job job = Job.getInstance(conf, "user name check"); 
 			
 			
     job.setJarByClass(UserNamePermission.class);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/BaileyBorweinPlouffe.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/BaileyBorweinPlouffe.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/BaileyBorweinPlouffe.java
index 36a953c..7c023cf 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/BaileyBorweinPlouffe.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/BaileyBorweinPlouffe.java
@@ -315,7 +315,7 @@ public class BaileyBorweinPlouffe extends Configured implements Tool {
   /** Create and setup a job */
   private static Job createJob(String name, Configuration conf
       ) throws IOException {
-    final Job job = new Job(conf, NAME + "_" + name);
+    final Job job = Job.getInstance(conf, NAME + "_" + name);
     final Configuration jobconf = job.getConfiguration();
     job.setJarByClass(BaileyBorweinPlouffe.class);
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Grep.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Grep.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Grep.java
index 810d0dd..44a51e0 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Grep.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Grep.java
@@ -56,7 +56,7 @@ public class Grep extends Configured implements Tool {
     if (args.length == 4)
       conf.set(RegexMapper.GROUP, args[3]);
 
-    Job grepJob = new Job(conf);
+    Job grepJob = Job.getInstance(conf);
     
     try {
       
@@ -77,7 +77,7 @@ public class Grep extends Configured implements Tool {
 
       grepJob.waitForCompletion(true);
 
-      Job sortJob = new Job(conf);
+      Job sortJob = Job.getInstance(conf);
       sortJob.setJobName("grep-sort");
       sortJob.setJarByClass(Grep.class);
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Join.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Join.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Join.java
index 2063d04..d831892 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Join.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Join.java
@@ -89,7 +89,7 @@ public class Join extends Configured implements Tool {
        num_reduces = cluster.getTaskTrackers() * 
                        Integer.parseInt(join_reduces);
     }
-    Job job = new Job(conf);
+    Job job = Job.getInstance(conf);
     job.setJobName("join");
     job.setJarByClass(Sort.class);
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/MultiFileWordCount.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/MultiFileWordCount.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/MultiFileWordCount.java
index af5e370..d3df4b3 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/MultiFileWordCount.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/MultiFileWordCount.java
@@ -229,7 +229,7 @@ public class MultiFileWordCount extends Configured implements Tool {
       return 2;
     }
 
-    Job job = new Job(getConf());
+    Job job = Job.getInstance(getConf());
     job.setJobName("MultiFileWordCount");
     job.setJarByClass(MultiFileWordCount.class);
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/QuasiMonteCarlo.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/QuasiMonteCarlo.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/QuasiMonteCarlo.java
index 8ddd64f..d565098 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/QuasiMonteCarlo.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/QuasiMonteCarlo.java
@@ -248,7 +248,7 @@ public class QuasiMonteCarlo extends Configured implements Tool {
   public static BigDecimal estimatePi(int numMaps, long numPoints,
       Path tmpDir, Configuration conf
       ) throws IOException, ClassNotFoundException, InterruptedException {
-    Job job = new Job(conf);
+    Job job = Job.getInstance(conf);
     //setup job conf
     job.setJobName(QuasiMonteCarlo.class.getSimpleName());
     job.setJarByClass(QuasiMonteCarlo.class);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/RandomTextWriter.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/RandomTextWriter.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/RandomTextWriter.java
index c1f3f5e..4d555c6 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/RandomTextWriter.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/RandomTextWriter.java
@@ -195,7 +195,7 @@ public class RandomTextWriter extends Configured implements Tool {
     }
     conf.setInt(MRJobConfig.NUM_MAPS, numMaps);
     
-    Job job = new Job(conf);
+    Job job = Job.getInstance(conf);
     
     job.setJarByClass(RandomTextWriter.class);
     job.setJobName("random-text-writer");

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/RandomWriter.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/RandomWriter.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/RandomWriter.java
index ea2e9ef..e1c13ec 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/RandomWriter.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/RandomWriter.java
@@ -261,7 +261,7 @@ public class RandomWriter extends Configured implements Tool {
     }
     conf.setInt(MRJobConfig.NUM_MAPS, numMaps);
 
-    Job job = new Job(conf);
+    Job job = Job.getInstance(conf);
     
     job.setJarByClass(RandomWriter.class);
     job.setJobName("random-writer");

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/SecondarySort.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/SecondarySort.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/SecondarySort.java
index 6d07735..d536ec9 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/SecondarySort.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/SecondarySort.java
@@ -214,7 +214,7 @@ public class SecondarySort {
       System.err.println("Usage: secondarysort <in> <out>");
       System.exit(2);
     }
-    Job job = new Job(conf, "secondary sort");
+    Job job = Job.getInstance(conf, "secondary sort");
     job.setJarByClass(SecondarySort.class);
     job.setMapperClass(MapClass.class);
     job.setReducerClass(Reduce.class);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Sort.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Sort.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Sort.java
index 5184bf0..a90c02b 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Sort.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/Sort.java
@@ -132,7 +132,7 @@ public class Sort<K,V> extends Configured implements Tool {
       }
     }
     // Set user-supplied (possibly default) job configs
-    job = new Job(conf);
+    job = Job.getInstance(conf);
     job.setJobName("sorter");
     job.setJarByClass(Sort.class);
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordCount.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordCount.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordCount.java
index 8634130..8a06963 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordCount.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordCount.java
@@ -72,7 +72,7 @@ public class WordCount {
       System.err.println("Usage: wordcount <in> [<in>...] <out>");
       System.exit(2);
     }
-    Job job = new Job(conf, "word count");
+    Job job = Job.getInstance(conf, "word count");
     job.setJarByClass(WordCount.class);
     job.setMapperClass(TokenizerMapper.class);
     job.setCombinerClass(IntSumReducer.class);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordMean.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordMean.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordMean.java
index fd7e9b6..626bb18 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordMean.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordMean.java
@@ -172,8 +172,7 @@ public class WordMean extends Configured implements Tool {
 
     Configuration conf = getConf();
 
-    @SuppressWarnings("deprecation")
-    Job job = new Job(conf, "word mean");
+    Job job = Job.getInstance(conf, "word mean");
     job.setJarByClass(WordMean.class);
     job.setMapperClass(WordMeanMapper.class);
     job.setCombinerClass(WordMeanReducer.class);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordMedian.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordMedian.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordMedian.java
index 36a1471..dd83122 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordMedian.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordMedian.java
@@ -181,8 +181,7 @@ public class WordMedian extends Configured implements Tool {
     setConf(new Configuration());
     Configuration conf = getConf();
 
-    @SuppressWarnings("deprecation")
-    Job job = new Job(conf, "word median");
+    Job job = Job.getInstance(conf, "word median");
     job.setJarByClass(WordMedian.class);
     job.setMapperClass(WordMedianMapper.class);
     job.setCombinerClass(WordMedianReducer.class);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordStandardDeviation.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordStandardDeviation.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordStandardDeviation.java
index 50a8f1e..da727fa 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordStandardDeviation.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordStandardDeviation.java
@@ -189,8 +189,7 @@ public class WordStandardDeviation extends Configured implements Tool {
 
     Configuration conf = getConf();
 
-    @SuppressWarnings("deprecation")
-    Job job = new Job(conf, "word stddev");
+    Job job = Job.getInstance(conf, "word stddev");
     job.setJarByClass(WordStandardDeviation.class);
     job.setMapperClass(WordStandardDeviationMapper.class);
     job.setCombinerClass(WordStandardDeviationReducer.class);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/dancing/DistributedPentomino.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/dancing/DistributedPentomino.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/dancing/DistributedPentomino.java
index e97d9c3..29f1eb2 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/dancing/DistributedPentomino.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/dancing/DistributedPentomino.java
@@ -198,7 +198,7 @@ public class DistributedPentomino extends Configured implements Tool {
     Path input = new Path(output + "_input");
     FileSystem fileSys = FileSystem.get(conf);
     try {
-      Job job = new Job(conf);
+      Job job = Job.getInstance(conf);
       FileInputFormat.setInputPaths(job, input);
       FileOutputFormat.setOutputPath(job, output);
       job.setJarByClass(PentMap.class);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/pi/DistSum.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/pi/DistSum.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/pi/DistSum.java
index b365ba7..99f7c24 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/pi/DistSum.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/pi/DistSum.java
@@ -432,7 +432,8 @@ public final class DistSum extends Configured implements Tool {
 
   /** Create a job */
   private Job createJob(String name, Summation sigma) throws IOException {
-    final Job job = new Job(getConf(), parameters.remoteDir + "/" + name);
+    final Job job = Job.getInstance(getConf(), parameters.remoteDir + "/" +
+                                    name);
     final Configuration jobconf = job.getConfiguration();
     job.setJarByClass(DistSum.class);
     jobconf.setInt(N_PARTS, parameters.nParts);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/GridmixJob.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/GridmixJob.java b/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/GridmixJob.java
index 1df625f..07d8878 100644
--- a/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/GridmixJob.java
+++ b/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/GridmixJob.java
@@ -114,8 +114,8 @@ abstract class GridmixJob implements Callable<Job>, Delayed {
           String jobId = null == jobdesc.getJobID() 
                          ? "<unknown>" 
                          : jobdesc.getJobID().toString();
-          Job ret = new Job(conf,
-                            nameFormat.get().format("%06d", seq).toString());
+          Job ret = Job.getInstance(conf, nameFormat.get().format("%06d", seq)
+                                          .toString());
           ret.getConfiguration().setInt(GRIDMIX_JOB_SEQ, seq);
 
           ret.getConfiguration().set(Gridmix.ORIGINAL_JOB_ID, jobId);
@@ -343,7 +343,7 @@ abstract class GridmixJob implements Callable<Job>, Delayed {
     try {
       job = this.ugi.doAs(new PrivilegedExceptionAction<Job>() {
         public Job run() throws IOException {
-          Job ret = new Job(conf, name);
+          Job ret = Job.getInstance(conf, name);
           ret.getConfiguration().setInt(GRIDMIX_JOB_SEQ, seq);
           setJobQueue(ret, conf.get(GRIDMIX_DEFAULT_QUEUE));
           return ret;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d98e5c9/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestCompressionEmulationUtils.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestCompressionEmulationUtils.java b/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestCompressionEmulationUtils.java
index 883e87c..152a8ee 100644
--- a/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestCompressionEmulationUtils.java
+++ b/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestCompressionEmulationUtils.java
@@ -157,7 +157,7 @@ public class TestCompressionEmulationUtils {
     // get the local job runner
     conf.setInt(MRJobConfig.NUM_MAPS, 1);
     
-    Job job = new Job(conf);
+    Job job = Job.getInstance(conf);
     
     CompressionEmulationUtil.configure(job);
     job.setInputFormatClass(CustomInputFormat.class);


Mime
View raw message