Merge -c 1225471 from trunk to branch-0.23 to fix MAPREDUCE-3521.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1225472 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c0e9c8bf5e
commit
0e4f690197
|
@ -321,6 +321,9 @@ Release 0.23.1 - Unreleased
|
|||
MAPREDUCE-3604. Fixed streaming to use new mapreduce.framework.name to
|
||||
check for local mode. (acmurthy)
|
||||
|
||||
MAPREDUCE-3521. Fixed streaming to ensure it doesn't silently ignore
|
||||
unknown arguments. (Robert Evans via acmurthy)
|
||||
|
||||
Release 0.23.0 - 2011-11-01
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -255,6 +255,13 @@ public class StreamJob implements Tool {
|
|||
}
|
||||
|
||||
if (cmdLine != null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> args = cmdLine.getArgList();
|
||||
if(args != null && args.size() > 0) {
|
||||
fail("Found " + args.size() + " unexpected arguments on the " +
|
||||
"command line " + args);
|
||||
}
|
||||
|
||||
detailedUsage_ = cmdLine.hasOption("info");
|
||||
if (cmdLine.hasOption("help") || detailedUsage_) {
|
||||
printUsage = true;
|
||||
|
|
|
@ -33,6 +33,17 @@ import static org.junit.Assert.*;
|
|||
*/
|
||||
public class TestStreamJob {
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testCreateJobWithExtraArgs() throws IOException {
|
||||
ArrayList<String> dummyArgs = new ArrayList<String>();
|
||||
dummyArgs.add("-input"); dummyArgs.add("dummy");
|
||||
dummyArgs.add("-output"); dummyArgs.add("dummy");
|
||||
dummyArgs.add("-mapper"); dummyArgs.add("dummy");
|
||||
dummyArgs.add("dummy");
|
||||
dummyArgs.add("-reducer"); dummyArgs.add("dummy");
|
||||
StreamJob.createJob(dummyArgs.toArray(new String[] {}));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateJob() throws IOException {
|
||||
JobConf job;
|
||||
|
|
Loading…
Reference in New Issue