MAPREDUCE-4994. Addendum fixing testcases failures. (sandyr via tucu)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1446042 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Alejandro Abdelnur 2013-02-14 04:22:04 +00:00
parent a96d228f55
commit ab330b33bb
5 changed files with 12 additions and 18 deletions

View File

@ -172,6 +172,8 @@ Release 2.0.4-beta - UNRELEASED
MAPREDUCE-5000. Fixes getCounters when speculating by fixing the selection
of the best attempt for a task. (Jason Lowe via sseth)
MAPREDUCE-4994. Addendum fixing testcases failures. (sandyr via tucu)
Release 2.0.3-alpha - 2013-02-06
INCOMPATIBLE CHANGES

View File

@ -37,6 +37,10 @@ public class LocalClientProtocolProvider extends ClientProtocolProvider {
if (!MRConfig.LOCAL_FRAMEWORK_NAME.equals(framework)) {
return null;
}
if (conf.get("mapreduce.job.maps") == null) {
conf.setInt("mapreduce.job.maps", 1);
}
return new LocalJobRunner(conf);
}

View File

@ -98,6 +98,7 @@ public class TestLineRecordReader extends TestCase {
InterruptedException, ClassNotFoundException {
Configuration conf = new Configuration();
conf.set("textinputformat.record.delimiter", "\t\n");
conf.setInt("mapreduce.job.maps", 1);
FileSystem localFs = FileSystem.getLocal(conf);
// cleanup
localFs.delete(workDir, true);

View File

@ -82,6 +82,7 @@ public class TestChainMapReduce extends HadoopTestCase {
JobConf conf = createJobConf();
conf.setBoolean("localFS", isLocalFS());
conf.setInt("mapreduce.job.maps", 1);
cleanFlags(conf);

View File

@ -42,24 +42,10 @@ public class TestClientProtocolProviderImpls extends TestCase {
}
try {
conf.set(MRConfig.FRAMEWORK_NAME, MRConfig.LOCAL_FRAMEWORK_NAME);
conf.set(JTConfig.JT_IPC_ADDRESS, "127.0.0.1:0");
new Cluster(conf);
fail("Cluster with Local Framework name should use local JT address");
} catch (IOException e) {
}
try {
conf.set(JTConfig.JT_IPC_ADDRESS, "local");
Cluster cluster = new Cluster(conf);
assertTrue(cluster.getClient() instanceof LocalJobRunner);
cluster.close();
} catch (IOException e) {
}
conf.set(MRConfig.FRAMEWORK_NAME, "local");
Cluster cluster = new Cluster(conf);
assertTrue(cluster.getClient() instanceof LocalJobRunner);
cluster.close();
}
@Test