MAPREDUCE-2679. Minor changes to sync trunk with MR-279 branch.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1145870 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2011-07-13 06:03:00 +00:00
parent 13a26379ed
commit f57eaf3989
6 changed files with 18 additions and 10 deletions

View File

@ -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)

View File

@ -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.authorize.AccessControlList;
@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>();

View File

@ -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);
}

View File

@ -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);
}

View File

@ -1113,13 +1113,17 @@ public class Job extends JobContextImpl implements JobContext {
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;
}
/**

View File

@ -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 {