hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r791713 - in /hadoop/mapreduce/trunk: CHANGES.txt src/java/org/apache/hadoop/mapred/JobHistory.java src/test/mapred/org/apache/hadoop/mapred/TestJobHistoryParsing.java
Date Tue, 07 Jul 2009 06:28:15 GMT
Author: ddas
Date: Tue Jul  7 06:28:15 2009
New Revision: 791713

URL: http://svn.apache.org/viewvc?rev=791713&view=rev
Log:
MAPREDUCE-683. Fixes an initialization problem in the JobHistory. The initialization of JobHistoryFilesManager
is now done in the JobHistory.init call. Contributed by Amar Kamat.

Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/JobHistory.java
    hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/TestJobHistoryParsing.java

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=791713&r1=791712&r2=791713&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Tue Jul  7 06:28:15 2009
@@ -125,3 +125,7 @@
     test integration between capacity scheduler and MR framework.
     (Sreekanth Ramakrishnan via yhemanth)
 
+    MAPREDUCE-683. Fixes an initialization problem in the JobHistory. 
+    The initialization of JobHistoryFilesManager is now done in the 
+    JobHistory.init call. (Amar Kamat via ddas)
+

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/JobHistory.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/JobHistory.java?rev=791713&r1=791712&r2=791713&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/JobHistory.java (original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/JobHistory.java Tue Jul  7 06:28:15
2009
@@ -91,12 +91,11 @@
   public static final int JOB_NAME_TRIM_LENGTH = 50;
   private static String JOBTRACKER_UNIQUE_STRING = null;
   private static String LOG_DIR = null;
-  private static boolean disableHistory = false; 
+  private static boolean disableHistory = true; 
   private static final String SECONDARY_FILE_SUFFIX = ".recover";
   private static long jobHistoryBlockSize = 0;
   private static String jobtrackerHostname;
-  private static JobHistoryFilesManager fileManager = 
-    new JobHistoryFilesManager();
+  private static JobHistoryFilesManager fileManager = null;
   final static FsPermission HISTORY_DIR_PERMISSION =
     FsPermission.createImmutable((short) 0750); // rwxr-x---
   final static FsPermission HISTORY_FILE_PERMISSION =
@@ -251,6 +250,9 @@
       
       // create the done folder with appropriate permission
       JT_FS.mkdirs(DONE, HISTORY_DIR_PERMISSION);
+
+      // initialize the file manager
+      fileManager = new JobHistoryFilesManager();
     } catch(IOException e) {
         LOG.error("Failed to initialize JobHistory log file", e); 
         disableHistory = true;

Modified: hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/TestJobHistoryParsing.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/TestJobHistoryParsing.java?rev=791713&r1=791712&r2=791713&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/TestJobHistoryParsing.java
(original)
+++ hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/TestJobHistoryParsing.java
Tue Jul  7 06:28:15 2009
@@ -56,10 +56,10 @@
     // open a test history file
     Path historyDir = new Path(System.getProperty("test.build.data", "."), 
                                 "history");
+    JobConf conf = new JobConf();
+    conf.set("hadoop.job.history.location", historyDir.toString());
     FileSystem fs = FileSystem.getLocal(new JobConf());
-    if (!fs.mkdirs(historyDir)) {
-      fail("Failed to create history directory");
-    }
+    JobHistory.init(conf, "localhost", 1234, fs);
     Path historyLog = new Path(historyDir, "testlog");
     PrintWriter out = new PrintWriter(fs.create(historyLog));
     historyWriter.add(out);



Mime
View raw message