hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r604452 - in /lucene/hadoop/branches/branch-0.15: CHANGES.txt src/java/org/apache/hadoop/mapred/JobTracker.java
Date Sat, 15 Dec 2007 16:49:56 GMT
Author: ddas
Date: Sat Dec 15 08:49:55 2007
New Revision: 604452

URL: http://svn.apache.org/viewvc?rev=604452&view=rev
Log:
Merge -r 604450:604451 from trunk to 0.15 branch. Fixes HADOOP-2228.

Modified:
    lucene/hadoop/branches/branch-0.15/CHANGES.txt
    lucene/hadoop/branches/branch-0.15/src/java/org/apache/hadoop/mapred/JobTracker.java

Modified: lucene/hadoop/branches/branch-0.15/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.15/CHANGES.txt?rev=604452&r1=604451&r2=604452&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.15/CHANGES.txt (original)
+++ lucene/hadoop/branches/branch-0.15/CHANGES.txt Sat Dec 15 08:49:55 2007
@@ -18,6 +18,10 @@
     HADOOP-2378.  Fixes a problem where the last task completion event would
     get created after the job completes. (Alejandro Abdelnur via ddas)
 
+    HADOOP-2228.  Checks whether a job with a certain jobId is already running
+    and then tries to create the JobInProgress object. 
+    (Johan Oskarsson via ddas)
+
   IMPROVEMENTS
 
     HADOOP-2160.  Remove project-level, non-user documentation from

Modified: lucene/hadoop/branches/branch-0.15/src/java/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.15/src/java/org/apache/hadoop/mapred/JobTracker.java?rev=604452&r1=604451&r2=604452&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.15/src/java/org/apache/hadoop/mapred/JobTracker.java (original)
+++ lucene/hadoop/branches/branch-0.15/src/java/org/apache/hadoop/mapred/JobTracker.java Sat
Dec 15 08:49:55 2007
@@ -1525,10 +1525,15 @@
    * asynchronously to handle split-computation and build up
    * the right TaskTracker/Block mapping.
    */
-  public synchronized JobStatus submitJob(String jobFile) throws IOException {
+  public synchronized JobStatus submitJob(String jobId) throws IOException {
     ensureRunning();
+    if(jobs.containsKey(jobId)) {
+      //job already running, don't start twice
+      return jobs.get(jobId).getStatus();
+    }
+    
     totalSubmissions++;
-    JobInProgress job = new JobInProgress(jobFile, this, this.conf);
+    JobInProgress job = new JobInProgress(jobId, this, this.conf);
     synchronized (jobs) {
       synchronized (jobsByPriority) {
         synchronized (jobInitQueue) {



Mime
View raw message