hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1076955 - in /hadoop/common/branches/branch-0.20-security-patches/src: mapred/org/apache/hadoop/mapred/JobHistory.java test/org/apache/hadoop/mapred/TestJobHistoryParsing.java
Date Fri, 04 Mar 2011 03:25:41 GMT
Author: omalley
Date: Fri Mar  4 03:25:41 2011
New Revision: 1076955

URL: http://svn.apache.org/viewvc?rev=1076955&view=rev
Log:
commit 1f1feb69b24b4093b1a36ac02fbb3ed30e1257cc
Author: Lee Tucker <ltucker@yahoo-inc.com>
Date:   Thu Jul 30 17:40:43 2009 -0700

    Applying patch 2852881.mr683.patch

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobHistory.java
    hadoop/common/branches/branch-0.20-security-patches/src/test/org/apache/hadoop/mapred/TestJobHistoryParsing.java

Modified: hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobHistory.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobHistory.java?rev=1076955&r1=1076954&r2=1076955&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobHistory.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobHistory.java
Fri Mar  4 03:25:41 2011
@@ -92,12 +92,11 @@ public class JobHistory {
   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 =
@@ -235,6 +234,9 @@ public class JobHistory {
 
       // create the done folder with appropriate permission
       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/common/branches/branch-0.20-security-patches/src/test/org/apache/hadoop/mapred/TestJobHistoryParsing.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/test/org/apache/hadoop/mapred/TestJobHistoryParsing.java?rev=1076955&r1=1076954&r2=1076955&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/test/org/apache/hadoop/mapred/TestJobHistoryParsing.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/test/org/apache/hadoop/mapred/TestJobHistoryParsing.java
Fri Mar  4 03:25:41 2011
@@ -56,10 +56,10 @@ public class TestJobHistoryParsing  exte
     // 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);
     Path historyLog = new Path(historyDir, "testlog");
     PrintWriter out = new PrintWriter(fs.create(historyLog));
     historyWriter.add(out);



Mime
View raw message