hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r690017 - in /hadoop/core/trunk: CHANGES.txt src/mapred/org/apache/hadoop/mapred/JobHistory.java
Date Thu, 28 Aug 2008 21:47:32 GMT
Author: omalley
Date: Thu Aug 28 14:47:32 2008
New Revision: 690017

URL: http://svn.apache.org/viewvc?rev=690017&view=rev
Log:
HADOOP-3937. Limit the job name in the job history filename to 50 
characters. (Matei Zaharia via omalley)

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobHistory.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=690017&r1=690016&r2=690017&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Aug 28 14:47:32 2008
@@ -239,6 +239,9 @@
     HADOOP-3342. Change the kill task actions to require http post instead of 
     get to prevent accidental crawls from triggering it. (enis via omalley)
 
+    HADOOP-3937. Limit the job name in the job history filename to 50 
+    characters. (Matei Zaharia via omalley)
+
   OPTIMIZATIONS
 
     HADOOP-3556. Removed lock contention in MD5Hash by changing the 

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobHistory.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobHistory.java?rev=690017&r1=690016&r2=690017&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobHistory.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobHistory.java Thu Aug 28 14:47:32
2008
@@ -71,6 +71,7 @@
   
   public static final String JOBTRACKER_START_TIME =
                                String.valueOf(System.currentTimeMillis());
+  public static final int JOB_NAME_TRIM_LENGTH = 50;
   private static String JOBTRACKER_UNIQUE_STRING = null;
   private static String LOG_DIR = null;
   private static Map<String, ArrayList<PrintWriter>> openJobs = 
@@ -449,9 +450,13 @@
         }
         
         // setup the history log file for this job
+        String trimmedJobName = jobName;
+        if (jobName.length() > JOB_NAME_TRIM_LENGTH) {
+          trimmedJobName = jobName.substring(0, JOB_NAME_TRIM_LENGTH);
+        }
         String logFileName = 
             encodeJobHistoryFileName(jobUniqueString +  "_" + user + "_" + 
-                                     jobName);
+                                     trimmedJobName);
 
         // find user log directory 
         Path outputPath = FileOutputFormat.getOutputPath(jobConf);



Mime
View raw message