hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1145870 - in /hadoop/common/trunk/mapreduce: ./ src/java/org/apache/hadoop/mapred/ src/java/org/apache/hadoop/mapreduce/ src/java/org/apache/hadoop/mapreduce/jobhistory/
Date Wed, 13 Jul 2011 06:03:00 GMT
Author: acmurthy
Date: Wed Jul 13 06:03:00 2011
New Revision: 1145870

URL: http://svn.apache.org/viewvc?rev=1145870&view=rev
Log:
MAPREDUCE-2679. Minor changes to sync trunk with MR-279 branch.

Modified:
    hadoop/common/trunk/mapreduce/CHANGES.txt
    hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobACLsManager.java
    hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobContextImpl.java
    hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/TaskAttemptContextImpl.java
    hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapreduce/Job.java
    hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java

Modified: hadoop/common/trunk/mapreduce/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/mapreduce/CHANGES.txt?rev=1145870&r1=1145869&r2=1145870&view=diff
==============================================================================
--- hadoop/common/trunk/mapreduce/CHANGES.txt (original)
+++ hadoop/common/trunk/mapreduce/CHANGES.txt Wed Jul 13 06:03:00 2011
@@ -37,6 +37,8 @@ Trunk (unreleased changes)
 
   IMPROVEMENTS
 
+    MAPREDUCE-2679. Minor changes to sync trunk with MR-279 branch. (acmurthy) 
+ 
     MAPREDUCE-2400. Remove Cluster's dependency on JobTracker via a 
     ServiceProvider for the actual implementation. (tomwhite via acmurthy) 
  

Modified: hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobACLsManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobACLsManager.java?rev=1145870&r1=1145869&r2=1145870&view=diff
==============================================================================
--- hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobACLsManager.java (original)
+++ hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobACLsManager.java Wed
Jul 13 06:03:00 2011
@@ -21,6 +21,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.mapreduce.JobACL;
 import org.apache.hadoop.mapreduce.MRConfig;
 import org.apache.hadoop.security.AccessControlException;
@@ -30,9 +31,9 @@ import org.apache.hadoop.security.author
 @InterfaceAudience.Private
 class JobACLsManager {
 
-  JobConf conf;
+  Configuration conf;
 
-  public JobACLsManager(JobConf conf) {
+  public JobACLsManager(Configuration conf) {
     this.conf = conf;
   }
 
@@ -47,7 +48,7 @@ class JobACLsManager {
    * 
    * @return JobACL to AccessControlList map.
    */
-  Map<JobACL, AccessControlList> constructJobACLs(JobConf conf) {
+  Map<JobACL, AccessControlList> constructJobACLs(Configuration conf) {
 
     Map<JobACL, AccessControlList> acls =
         new HashMap<JobACL, AccessControlList>();

Modified: hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobContextImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobContextImpl.java?rev=1145870&r1=1145869&r2=1145870&view=diff
==============================================================================
--- hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobContextImpl.java (original)
+++ hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/JobContextImpl.java Wed
Jul 13 06:03:00 2011
@@ -33,14 +33,14 @@ public class JobContextImpl 
   private JobConf job;
   private Progressable progress;
 
-  JobContextImpl(JobConf conf, org.apache.hadoop.mapreduce.JobID jobId, 
+  public JobContextImpl(JobConf conf, org.apache.hadoop.mapreduce.JobID jobId, 
                  Progressable progress) {
     super(conf, jobId);
     this.job = conf;
     this.progress = progress;
   }
 
-  JobContextImpl(JobConf conf, org.apache.hadoop.mapreduce.JobID jobId) {
+  public JobContextImpl(JobConf conf, org.apache.hadoop.mapreduce.JobID jobId) {
     this(conf, jobId, Reporter.NULL);
   }
   

Modified: hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/TaskAttemptContextImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/TaskAttemptContextImpl.java?rev=1145870&r1=1145869&r2=1145870&view=diff
==============================================================================
--- hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/TaskAttemptContextImpl.java
(original)
+++ hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/TaskAttemptContextImpl.java
Wed Jul 13 06:03:00 2011
@@ -34,7 +34,7 @@ public class TaskAttemptContextImpl
        implements TaskAttemptContext {
   private Reporter reporter;
 
-  TaskAttemptContextImpl(JobConf conf, TaskAttemptID taskid) {
+  public TaskAttemptContextImpl(JobConf conf, TaskAttemptID taskid) {
     this(conf, taskid, Reporter.NULL);
   }
   

Modified: hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapreduce/Job.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapreduce/Job.java?rev=1145870&r1=1145869&r2=1145870&view=diff
==============================================================================
--- hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapreduce/Job.java (original)
+++ hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapreduce/Job.java Wed Jul 13
06:03:00 2011
@@ -1113,13 +1113,17 @@ public class Job extends JobContextImpl 
       eventCounter += events.length;
       printTaskEvents(events, filter, profiling, mapRanges, reduceRanges);
     }
+    boolean success = isSuccessful();
+    if (success) {
+      LOG.info("Job " + jobId + " completed successfully");
+    } else {
+      LOG.info("Job " + jobId + " failed with state " + status.getState());
+    }
     Counters counters = getCounters();
     if (counters != null) {
       LOG.info(counters.toString());
     }
-    LOG.info("Job " + jobId + " completed with status: "
-          + getStatus().getState());
-    return isSuccessful();
+    return success;
   }
 
   /**

Modified: hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java?rev=1145870&r1=1145869&r2=1145870&view=diff
==============================================================================
--- hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java
(original)
+++ hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java
Wed Jul 13 06:03:00 2011
@@ -66,8 +66,9 @@ class EventWriter {
     out.writeBytes("\n");
   }
   
-  void flush() throws IOException { 
+  void flush() throws IOException {
     encoder.flush();
+    out.flush();
   }
 
   void close() throws IOException {



Mime
View raw message