MAPREDUCE-5484. YarnChild unnecessarily loads job conf twice (Sandy Ryza)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1518857 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eb484bb562
commit
2cc851a66e
|
@ -162,6 +162,8 @@ Release 2.3.0 - UNRELEASED
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
|
MAPREDUCE-5484. YarnChild unnecessarily loads job conf twice (Sandy Ryza)
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
||||||
MAPREDUCE-5316. job -list-attempt-ids command does not handle illegal
|
MAPREDUCE-5316. job -list-attempt-ids command does not handle illegal
|
||||||
|
|
|
@ -75,9 +75,9 @@ class YarnChild {
|
||||||
Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
|
Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
|
||||||
LOG.debug("Child starting");
|
LOG.debug("Child starting");
|
||||||
|
|
||||||
final JobConf defaultConf = new JobConf();
|
final JobConf job = new JobConf();
|
||||||
defaultConf.addResource(MRJobConfig.JOB_CONF_FILE);
|
job.addResource(MRJobConfig.JOB_CONF_FILE);
|
||||||
UserGroupInformation.setConfiguration(defaultConf);
|
UserGroupInformation.setConfiguration(job);
|
||||||
|
|
||||||
String host = args[0];
|
String host = args[0];
|
||||||
int port = Integer.parseInt(args[1]);
|
int port = Integer.parseInt(args[1]);
|
||||||
|
@ -111,7 +111,7 @@ class YarnChild {
|
||||||
@Override
|
@Override
|
||||||
public TaskUmbilicalProtocol run() throws Exception {
|
public TaskUmbilicalProtocol run() throws Exception {
|
||||||
return (TaskUmbilicalProtocol)RPC.getProxy(TaskUmbilicalProtocol.class,
|
return (TaskUmbilicalProtocol)RPC.getProxy(TaskUmbilicalProtocol.class,
|
||||||
TaskUmbilicalProtocol.versionID, address, defaultConf);
|
TaskUmbilicalProtocol.versionID, address, job);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ class YarnChild {
|
||||||
YarnChild.taskid = task.getTaskID();
|
YarnChild.taskid = task.getTaskID();
|
||||||
|
|
||||||
// Create the job-conf and set credentials
|
// Create the job-conf and set credentials
|
||||||
final JobConf job = configureTask(task, credentials, jt);
|
configureTask(job, task, credentials, jt);
|
||||||
|
|
||||||
// log the system properties
|
// log the system properties
|
||||||
String systemPropsToLog = MRApps.getSystemPropertiesToLog(job);
|
String systemPropsToLog = MRApps.getSystemPropertiesToLog(job);
|
||||||
|
@ -260,9 +260,8 @@ class YarnChild {
|
||||||
job.set(MRJobConfig.JOB_LOCAL_DIR,workDir.toString());
|
job.set(MRJobConfig.JOB_LOCAL_DIR,workDir.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static JobConf configureTask(Task task, Credentials credentials,
|
private static void configureTask(JobConf job, Task task,
|
||||||
Token<JobTokenIdentifier> jt) throws IOException {
|
Credentials credentials, Token<JobTokenIdentifier> jt) throws IOException {
|
||||||
final JobConf job = new JobConf(MRJobConfig.JOB_CONF_FILE);
|
|
||||||
job.setCredentials(credentials);
|
job.setCredentials(credentials);
|
||||||
|
|
||||||
ApplicationAttemptId appAttemptId =
|
ApplicationAttemptId appAttemptId =
|
||||||
|
@ -306,7 +305,6 @@ class YarnChild {
|
||||||
writeLocalJobFile(localTaskFile, job);
|
writeLocalJobFile(localTaskFile, job);
|
||||||
task.setJobFile(localTaskFile.toString());
|
task.setJobFile(localTaskFile.toString());
|
||||||
task.setConf(job);
|
task.setConf(job);
|
||||||
return job;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue