MAPREDUCE-5006. Fix failing streaming tests due to MAPREDUCE-4994. Contributed by Sandy Ryza.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1461537 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas White 2013-03-27 11:42:32 +00:00
parent 8a21e3925c
commit b1c781b2be
4 changed files with 7 additions and 3 deletions

View File

@ -110,6 +110,9 @@ Release 2.0.5-beta - UNRELEASED
MAPREDUCE-3757. [Rumen] Fixed Rumen Folder to adjust shuffleFinished and MAPREDUCE-3757. [Rumen] Fixed Rumen Folder to adjust shuffleFinished and
sortFinished times when needed. (Ravi Gummadi via tgraves) sortFinished times when needed. (Ravi Gummadi via tgraves)
MAPREDUCE-5006. Fix failing streaming tests due to MAPREDUCE-4994.
(Sandy Ryza via tomwhite)
Release 2.0.4-alpha - UNRELEASED Release 2.0.4-alpha - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -37,9 +37,7 @@ public ClientProtocol create(Configuration conf) throws IOException {
if (!MRConfig.LOCAL_FRAMEWORK_NAME.equals(framework)) { if (!MRConfig.LOCAL_FRAMEWORK_NAME.equals(framework)) {
return null; return null;
} }
if (conf.get("mapreduce.job.maps") == null) { conf.setInt(JobContext.NUM_MAPS, 1);
conf.setInt("mapreduce.job.maps", 1);
}
return new LocalJobRunner(conf); return new LocalJobRunner(conf);
} }

View File

@ -68,6 +68,7 @@ protected String[] genArgs() {
"-reducer", "org.apache.hadoop.mapred.lib.IdentityReducer", "-reducer", "org.apache.hadoop.mapred.lib.IdentityReducer",
"-numReduceTasks", "0", "-numReduceTasks", "0",
"-jobconf", "mapreduce.task.files.preserve.failedtasks=true", "-jobconf", "mapreduce.task.files.preserve.failedtasks=true",
"-jobconf", "mapreduce.job.maps=1",
"-jobconf", "stream.tmpdir="+System.getProperty("test.build.data","/tmp") "-jobconf", "stream.tmpdir="+System.getProperty("test.build.data","/tmp")
}; };
} }

View File

@ -54,6 +54,8 @@ protected void createInput() throws IOException
protected String[] genArgs() { protected String[] genArgs() {
args.add("-inputreader"); args.add("-inputreader");
args.add("StreamXmlRecordReader,begin=<xmltag>,end=</xmltag>"); args.add("StreamXmlRecordReader,begin=<xmltag>,end=</xmltag>");
args.add("-jobconf");
args.add("mapreduce.job.maps=1");
return super.genArgs(); return super.genArgs();
} }
} }