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

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1445331 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Alejandro Abdelnur 2013-02-12 20:16:43 +00:00
parent 7ae27355bc
commit a6925b3fdd
3 changed files with 9 additions and 12 deletions

View File

@ -268,7 +268,12 @@ public class GenericOptionsParser {
} }
if (line.hasOption("jt")) { 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"); "from -jt command line option");
} }
if (line.hasOption("conf")) { if (line.hasOption("conf")) {

View File

@ -15,6 +15,8 @@ Release 2.0.4-beta - UNRELEASED
MAPREDUCE-4671. AM does not tell the RM about container requests which are MAPREDUCE-4671. AM does not tell the RM about container requests which are
no longer needed. (Bikas Saha via sseth) 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 Release 2.0.3-alpha - 2013-02-06
INCOMPATIBLE CHANGES 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.MRConfig;
import org.apache.hadoop.mapreduce.protocol.ClientProtocol; import org.apache.hadoop.mapreduce.protocol.ClientProtocol;
import org.apache.hadoop.mapreduce.protocol.ClientProtocolProvider; import org.apache.hadoop.mapreduce.protocol.ClientProtocolProvider;
import org.apache.hadoop.mapreduce.server.jobtracker.JTConfig;
@InterfaceAudience.Private @InterfaceAudience.Private
public class LocalClientProtocolProvider extends ClientProtocolProvider { public class LocalClientProtocolProvider extends ClientProtocolProvider {
@ -38,16 +37,7 @@ public class LocalClientProtocolProvider extends ClientProtocolProvider {
if (!MRConfig.LOCAL_FRAMEWORK_NAME.equals(framework)) { if (!MRConfig.LOCAL_FRAMEWORK_NAME.equals(framework)) {
return null; 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); return new LocalJobRunner(conf);
} else {
throw new IOException("Invalid \"" + JTConfig.JT_IPC_ADDRESS
+ "\" configuration value for LocalJobRunner : \""
+ tracker + "\"");
}
} }
@Override @Override