MAPREDUCE-4994. -jt generic command line option does not work. (sandyr via tucu)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1445330 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Alejandro Abdelnur 2013-02-12 20:16:08 +00:00
parent 969e84decb
commit 7e615c7f75
3 changed files with 9 additions and 12 deletions

View File

@ -268,7 +268,12 @@ public class GenericOptionsParser {
}
if (line.hasOption("jt")) {
conf.set("mapred.job.tracker", line.getOptionValue("jt"),
String optionValue = line.getOptionValue("jt");
if (optionValue.equalsIgnoreCase("local")) {
conf.set("mapreduce.framework.name", optionValue);
}
conf.set("yarn.resourcemanager.address", optionValue,
"from -jt command line option");
}
if (line.hasOption("conf")) {

View File

@ -167,6 +167,8 @@ Release 2.0.4-beta - UNRELEASED
MAPREDUCE-4671. AM does not tell the RM about container requests which are
no longer needed. (Bikas Saha via sseth)
MAPREDUCE-4994. -jt generic command line option does not work. (sandyr via tucu)
Release 2.0.3-alpha - 2013-02-06
INCOMPATIBLE CHANGES

View File

@ -26,7 +26,6 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.mapreduce.MRConfig;
import org.apache.hadoop.mapreduce.protocol.ClientProtocol;
import org.apache.hadoop.mapreduce.protocol.ClientProtocolProvider;
import org.apache.hadoop.mapreduce.server.jobtracker.JTConfig;
@InterfaceAudience.Private
public class LocalClientProtocolProvider extends ClientProtocolProvider {
@ -38,16 +37,7 @@ public class LocalClientProtocolProvider extends ClientProtocolProvider {
if (!MRConfig.LOCAL_FRAMEWORK_NAME.equals(framework)) {
return null;
}
String tracker = conf.get(JTConfig.JT_IPC_ADDRESS, "local");
if ("local".equals(tracker)) {
conf.setInt("mapreduce.job.maps", 1);
return new LocalJobRunner(conf);
} else {
throw new IOException("Invalid \"" + JTConfig.JT_IPC_ADDRESS
+ "\" configuration value for LocalJobRunner : \""
+ tracker + "\"");
}
return new LocalJobRunner(conf);
}
@Override