You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by dd...@apache.org on 2007/12/15 17:45:04 UTC
svn commit: r604451 - in /lucene/hadoop/trunk: CHANGES.txt
src/java/org/apache/hadoop/mapred/JobTracker.java
Author: ddas
Date: Sat Dec 15 08:45:03 2007
New Revision: 604451
URL: http://svn.apache.org/viewvc?rev=604451&view=rev
Log:
HADOOP-2228. Checks whether a job with a certain jobId is already running and then tries to create the JobInProgress object. Contributed by Johan Oskarsson.
Modified:
lucene/hadoop/trunk/CHANGES.txt
lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java
Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=604451&r1=604450&r2=604451&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Sat Dec 15 08:45:03 2007
@@ -263,6 +263,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/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java?rev=604451&r1=604450&r2=604451&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java Sat Dec 15 08:45:03 2007
@@ -1531,10 +1531,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) {