hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r581337 - in /lucene/hadoop/branches/branch-0.14: CHANGES.txt src/java/org/apache/hadoop/mapred/JobClient.java src/java/org/apache/hadoop/mapred/JobSubmissionProtocol.java src/java/org/apache/hadoop/mapred/LocalJobRunner.java
Date Tue, 02 Oct 2007 18:16:27 GMT
Author: omalley
Date: Tue Oct  2 11:16:26 2007
New Revision: 581337

URL: http://svn.apache.org/viewvc?rev=581337&view=rev
Log:
Merge -r 581318:581319 from trunk to 0.14 to fix HADOOP-1977. Contributed by
Enis.

Modified:
    lucene/hadoop/branches/branch-0.14/CHANGES.txt
    lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobClient.java
    lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobSubmissionProtocol.java
    lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/LocalJobRunner.java

Modified: lucene/hadoop/branches/branch-0.14/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/CHANGES.txt?rev=581337&r1=581336&r2=581337&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/CHANGES.txt (original)
+++ lucene/hadoop/branches/branch-0.14/CHANGES.txt Tue Oct  2 11:16:26 2007
@@ -11,6 +11,9 @@
     HADOOP-1948. Removed spurious error message during block crc upgrade.
     (Raghu Angadi via dhruba)
 
+    HADOOP-1977. Fixed handling of ToolBase cli options in JobClient.
+    (enis via omalley)
+
 Release 0.14.1 - 2007-09-04
 
   BUG FIXES

Modified: lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobClient.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobClient.java?rev=581337&r1=581336&r2=581337&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobClient.java (original)
+++ lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobClient.java Tue
Oct  2 11:16:26 2007
@@ -768,7 +768,7 @@
     if (submitJobFile != null) {
       conf = new JobConf(submitJobFile);
     } else {
-      conf = new JobConf();
+      conf = new JobConf(getConf());
     }
     init(conf);
         

Modified: lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobSubmissionProtocol.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobSubmissionProtocol.java?rev=581337&r1=581336&r2=581337&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobSubmissionProtocol.java
(original)
+++ lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobSubmissionProtocol.java
Tue Oct  2 11:16:26 2007
@@ -18,7 +18,7 @@
 
 package org.apache.hadoop.mapred;
 
-import java.io.*;
+import java.io.IOException;
 
 import org.apache.hadoop.ipc.VersionedProtocol;
 
@@ -60,12 +60,14 @@
   public void killJob(String jobid) throws IOException;
 
   /**
-   * Grab a handle to a job that is already known to the JobTracker
+   * Grab a handle to a job that is already known to the JobTracker.
+   * @return Profile of the job, or null if not found. 
    */
   public JobProfile getJobProfile(String jobid) throws IOException;
 
   /**
-   * Grab a handle to a job that is already known to the JobTracker
+   * Grab a handle to a job that is already known to the JobTracker.
+   * @return Status of the job, or null if not found.
    */
   public JobStatus getJobStatus(String jobid) throws IOException;
 

Modified: lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/LocalJobRunner.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/LocalJobRunner.java?rev=581337&r1=581336&r2=581337&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/LocalJobRunner.java
(original)
+++ lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/LocalJobRunner.java
Tue Oct  2 11:16:26 2007
@@ -28,7 +28,8 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.io.*;
+import org.apache.hadoop.io.BytesWritable;
+import org.apache.hadoop.io.DataOutputBuffer;
 import org.apache.hadoop.mapred.JobTracker.JobTrackerMetrics;
 
 /** Implements MapReduce locally, in-process, for debugging. */ 
@@ -97,6 +98,7 @@
       return profile;
     }
     
+    @Override
     public void run() {
       try {
         // split input into minimum number of splits
@@ -281,7 +283,10 @@
 
   public JobProfile getJobProfile(String id) {
     Job job = jobs.get(id);
-    return job.getProfile();
+    if(job != null)
+      return job.getProfile();
+    else 
+      return null;
   }
 
   public TaskReport[] getMapTaskReports(String id) {
@@ -293,7 +298,10 @@
 
   public JobStatus getJobStatus(String id) {
     Job job = jobs.get(id);
-    return job.status;
+    if(job != null)
+      return job.status;
+    else 
+      return null;
   }
   
   public Counters getJobCounters(String id) {



Mime
View raw message