فهرست منبع

HADOOP-3769. Make the SampleMapper and SampleReducer from
GenericMRLoadGenerator public, so they can be used in other contexts.
(Lingyun Yang via omalley)


git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@690117 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 17 سال پیش
والد
کامیت
8b09dc199a

+ 4 - 0
CHANGES.txt

@@ -267,6 +267,10 @@ Trunk (unreleased changes)
     HADOOP-2130. Pipes submit job should have both blocking and non-blocking
     versions. (acmurthy via omalley)
 
+    HADOOP-3769. Make the SampleMapper and SampleReducer from
+    GenericMRLoadGenerator public, so they can be used in other contexts. 
+    (Lingyun Yang via omalley)
+
   BUG FIXES
 
     HADOOP-3563.  Refactor the distributed upgrade code so that it is 

+ 8 - 0
src/mapred/org/apache/hadoop/mapred/jobcontrol/Job.java

@@ -224,6 +224,14 @@ public class Job {
     this.message = message;
   }
 	
+
+  /**
+   * @return the job client of this job
+   */
+  public JobClient getJobClient(){
+          return this.jc;
+  }
+
   /**
    * @return the depending jobs of this job
    */

+ 2 - 2
src/test/org/apache/hadoop/mapred/GenericMRLoadGenerator.java

@@ -333,7 +333,7 @@ public class GenericMRLoadGenerator extends Configured implements Tool {
     }
   }
 
-  static class SampleMapper<K extends WritableComparable, V extends Writable>
+  public static class SampleMapper<K extends WritableComparable, V extends Writable>
       extends SampleMapReduceBase<K,V> implements Mapper<K,V,K,V> {
 
     public void configure(JobConf job) {
@@ -349,7 +349,7 @@ public class GenericMRLoadGenerator extends Configured implements Tool {
 
   }
 
-  static class SampleReducer<K extends WritableComparable, V extends Writable>
+  public static class SampleReducer<K extends WritableComparable, V extends Writable>
       extends SampleMapReduceBase<K,V> implements Reducer<K,V,K,V> {
 
     public void configure(JobConf job) {