Bläddra i källkod

HADOOP-1344. Add RunningJob#getJobName(). Contributed by Michael Bieniosek.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@537295 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 år sedan
förälder
incheckning
6d379f4d77

+ 2 - 0
CHANGES.txt

@@ -9,6 +9,8 @@ Trunk (unreleased changes)
   2. HADOOP-1343.  In Configuration, deprecate set(String,Object) and
      implement Iterable. (omalley via cutting)
 
+  3. HADOOP-1344.  Add RunningJob#getJobName(). (Michael Bieniosek via cutting)
+
 
 Branch 0.13 (unreleased changes)
 

+ 7 - 0
src/java/org/apache/hadoop/mapred/JobClient.java

@@ -84,6 +84,13 @@ public class JobClient extends ToolBase implements MRConstants  {
     public String getJobID() {
       return profile.getJobId();
     }
+    
+    /**
+     * The user-specified job name
+     */
+    public String getJobName() {
+      return profile.getJobName();
+    }
 
     /**
      * The name of the job file

+ 5 - 0
src/java/org/apache/hadoop/mapred/RunningJob.java

@@ -31,6 +31,11 @@ public interface RunningJob {
    * Returns an identifier for the job
    */
   public String getJobID();
+  
+  /**
+   * Returns the name of the job
+   */
+  public String getJobName();
 
   /**
    * Returns the path of the submitted job.