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:
parent
13a26379ed
commit
f57eaf3989
@ -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)
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
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 @@
|
||||
@InterfaceAudience.Private
|
||||
class JobACLsManager {
|
||||
|
||||
JobConf conf;
|
||||
Configuration conf;
|
||||
|
||||
public JobACLsManager(JobConf conf) {
|
||||
public JobACLsManager(Configuration conf) {
|
||||
this.conf = conf;
|
||||
}
|
||||
|
||||
@ -47,7 +48,7 @@ boolean areACLsEnabled() {
|
||||
*
|
||||
* @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>();
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -1113,13 +1113,17 @@ public boolean monitorAndPrintJob()
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -66,8 +66,9 @@ synchronized void write(HistoryEvent event) throws IOException {
|
||||
out.writeBytes("\n");
|
||||
}
|
||||
|
||||
void flush() throws IOException {
|
||||
void flush() throws IOException {
|
||||
encoder.flush();
|
||||
out.flush();
|
||||
}
|
||||
|
||||
void close() throws IOException {
|
||||
|
Loading…
Reference in New Issue
Block a user