hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r474907 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/mapred/TaskTracker.java
Date Tue, 14 Nov 2006 18:25:08 GMT
Author: cutting
Date: Tue Nov 14 10:25:07 2006
New Revision: 474907

URL: http://svn.apache.org/viewvc?view=rev&rev=474907
Log:
HADOOP-705.  Fix a bug in the JobTracker when failed jobs were not completely cleaned up.
 Contributed by Mahadev.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=474907&r1=474906&r2=474907
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Tue Nov 14 10:25:07 2006
@@ -53,6 +53,9 @@
 16. HADOOP-646.  Fix namenode to handle edits files larger than 2GB.
     (Milind Bhandarkar via cutting)
 
+17. HADOOP-705.  Fix a bug in the JobTracker when failed jobs were
+    not completely cleaned up.  (Mahadev Konar via cutting)
+
 
 Release 0.8.0 - 2006-11-03
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java?view=diff&rev=474907&r1=474906&r2=474907
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java Tue Nov 14 10:25:07
2006
@@ -276,13 +276,25 @@
                                   jobId + Path.SEPARATOR + "job.jar");
   
           String jobFile = t.getJobFile();
+          FileSystem localFs = FileSystem.getNamed("local", fConf);
+          // this will happen on a partial execution of localizeJob.
+          // Sometimes the job.xml gets copied but copying job.jar
+          // might throw out an exception
+          // we should clean up and then try again
+          Path jobDir = localJobFile.getParent();
+          if (localFs.exists(jobDir)){
+            localFs.delete(jobDir);
+            boolean b = localFs.mkdirs(jobDir);
+            if (!b)
+              throw new IOException("Not able to create job directory "
+                  + jobDir.toString());
+          }
           fs.copyToLocalFile(new Path(jobFile), localJobFile);
           JobConf localJobConf = new JobConf(localJobFile);
           String jarFile = localJobConf.getJar();
           if (jarFile != null) {
             fs.copyToLocalFile(new Path(jarFile), localJarFile);
             localJobConf.setJar(localJarFile.toString());
-            FileSystem localFs = FileSystem.getNamed("local", fConf);
             OutputStream out = localFs.create(localJobFile);
             try {
               localJobConf.write(out);



Mime
View raw message