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 ac...@apache.org on 2008/04/17 00:33:04 UTC
svn commit: r648885 - in /hadoop/core/branches/branch-0.17: CHANGES.txt
src/java/org/apache/hadoop/mapred/JobHistory.java
Author: acmurthy
Date: Wed Apr 16 15:32:53 2008
New Revision: 648885
URL: http://svn.apache.org/viewvc?rev=648885&view=rev
Log:
Merge -r 648881:648882 from trunk to branch-0.17 to fix HADOOP-3263
Modified:
hadoop/core/branches/branch-0.17/CHANGES.txt
hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/mapred/JobHistory.java
Modified: hadoop/core/branches/branch-0.17/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.17/CHANGES.txt?rev=648885&r1=648884&r2=648885&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.17/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.17/CHANGES.txt Wed Apr 16 15:32:53 2008
@@ -584,6 +584,11 @@
HADOOP-3162. Ensure that comma-separated input paths are treated correctly
as multiple input paths. (Amareshwari Sri Ramadasu via acmurthy)
+ HADOOP-3263. Ensure that the job-history log file always follows the
+ pattern of hostname_timestamp_jobid_username_jobname even if username
+ and/or jobname are not specfied. This helps to avoid wrong assumptions
+ made about the job-history log filename in jobhistory.jsp. (acmurthy)
+
Release 0.16.3 - 2008-04-16
BUG FIXES
Modified: hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/mapred/JobHistory.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/mapred/JobHistory.java?rev=648885&r1=648884&r2=648885&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/mapred/JobHistory.java (original)
+++ hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/mapred/JobHistory.java Wed Apr 16 15:32:53 2008
@@ -70,7 +70,6 @@
private static final String VALUE = "[[^\"]?]+"; // anything but a " in ""
private static final Pattern pattern = Pattern.compile(KEY + "=" + "\"" + VALUE + "\"");
- private static final int MAX_FILENAME_SIZE = 255;
public static final String JOBTRACKER_START_TIME =
String.valueOf(System.currentTimeMillis());
@@ -434,21 +433,27 @@
public static void logSubmitted(String jobId, JobConf jobConf,
String jobConfPath, long submitTime)
throws IOException {
- String jobName = jobConf.getJobName();
- String user = jobConf.getUser();
FileSystem fs = null;
String userLogDir = null;
String jobUniqueString = JOBTRACKER_UNIQUE_STRING + jobId;
if (!disableHistory){
+ // Get the username and job name to be used in the actual log filename;
+ // sanity check them too
+ String jobName = jobConf.getJobName();
+ if (jobName == null || jobName.length() == 0) {
+ jobName = "NA";
+ }
+
+ String user = jobConf.getUser();
+ if (user == null || user.length() == 0) {
+ user = "NA";
+ }
+
// setup the history log file for this job
String logFileName =
- encodeJobHistoryFileName(jobUniqueString + "_" + user+ "_" +
+ encodeJobHistoryFileName(jobUniqueString + "_" + user + "_" +
jobName);
-
- if (logFileName.length() > MAX_FILENAME_SIZE) {
- logFileName = logFileName.substring(0, MAX_FILENAME_SIZE-1);
- }
// find user log directory
Path outputPath = FileOutputFormat.getOutputPath(jobConf);