MAPREDUCE-4735. Make arguments in TestDFSIO case insensitive. Contributed by Brandon Li.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1399952 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2012-10-19 02:37:59 +00:00
parent 7da5d03c35
commit adcf7d10b9
2 changed files with 26 additions and 20 deletions

View File

@ -42,7 +42,8 @@ Trunk (Unreleased)
MAPREDUCE-3169. Create a new MiniMRCluster equivalent which only provides MAPREDUCE-3169. Create a new MiniMRCluster equivalent which only provides
client APIs cross MR1 and MR2 (Ahmed via tucu) client APIs cross MR1 and MR2 (Ahmed via tucu)
MAPREDUCE-2944. Improve checking of input for JobClient.displayTasks() (XieXianshan via harsh) MAPREDUCE-2944. Improve checking of input for JobClient.displayTasks()
(XieXianshan via harsh)
MAPREDUCE-3956. Remove the use of the deprecated Syncable.sync() method from MAPREDUCE-3956. Remove the use of the deprecated Syncable.sync() method from
TeraOutputFormat in the terasort example. (szetszwo) TeraOutputFormat in the terasort example. (szetszwo)
@ -61,7 +62,11 @@ Trunk (Unreleased)
MAPREDUCE-4371. Check for cyclic dependencies in Jobcontrol job DAG MAPREDUCE-4371. Check for cyclic dependencies in Jobcontrol job DAG
(madhukara phatak via bobby) (madhukara phatak via bobby)
MAPREDUCE-4686. hadoop-mapreduce-client-core fails compilation in Eclipse due to missing Avro-generated classes (Chris Nauroth via harsh) MAPREDUCE-4686. hadoop-mapreduce-client-core fails compilation in Eclipse
due to missing Avro-generated classes (Chris Nauroth via harsh)
MAPREDUCE-4735. Make arguments in TestDFSIO case insensitive.
(Brandon Li via suresh)
BUG FIXES BUG FIXES

View File

@ -673,36 +673,37 @@ public class TestDFSIO implements Tool {
} }
for (int i = 0; i < args.length; i++) { // parse command line for (int i = 0; i < args.length; i++) { // parse command line
if (args[i].startsWith("-read")) { if (args[i].toLowerCase().startsWith("-read")) {
testType = TestType.TEST_TYPE_READ; testType = TestType.TEST_TYPE_READ;
} else if (args[i].equals("-write")) { } else if (args[i].equalsIgnoreCase("-write")) {
testType = TestType.TEST_TYPE_WRITE; testType = TestType.TEST_TYPE_WRITE;
} else if (args[i].equals("-append")) { } else if (args[i].equalsIgnoreCase("-append")) {
testType = TestType.TEST_TYPE_APPEND; testType = TestType.TEST_TYPE_APPEND;
} else if (args[i].equals("-random")) { } else if (args[i].equalsIgnoreCase("-random")) {
if(testType != TestType.TEST_TYPE_READ) return -1; if (testType != TestType.TEST_TYPE_READ) return -1;
testType = TestType.TEST_TYPE_READ_RANDOM; testType = TestType.TEST_TYPE_READ_RANDOM;
} else if (args[i].equals("-backward")) { } else if (args[i].equalsIgnoreCase("-backward")) {
if(testType != TestType.TEST_TYPE_READ) return -1; if (testType != TestType.TEST_TYPE_READ) return -1;
testType = TestType.TEST_TYPE_READ_BACKWARD; testType = TestType.TEST_TYPE_READ_BACKWARD;
} else if (args[i].equals("-skip")) { } else if (args[i].equalsIgnoreCase("-skip")) {
if(testType != TestType.TEST_TYPE_READ) return -1; if (testType != TestType.TEST_TYPE_READ) return -1;
testType = TestType.TEST_TYPE_READ_SKIP; testType = TestType.TEST_TYPE_READ_SKIP;
} else if (args[i].equals("-clean")) { } else if (args[i].equalsIgnoreCase("-clean")) {
testType = TestType.TEST_TYPE_CLEANUP; testType = TestType.TEST_TYPE_CLEANUP;
} else if (args[i].startsWith("-seq")) { } else if (args[i].toLowerCase().startsWith("-seq")) {
isSequential = true; isSequential = true;
} else if (args[i].startsWith("-compression")) { } else if (args[i].toLowerCase().startsWith("-compression")) {
compressionClass = args[++i]; compressionClass = args[++i];
} else if (args[i].equals("-nrFiles")) { } else if (args[i].equalsIgnoreCase("-nrfiles")) {
nrFiles = Integer.parseInt(args[++i]); nrFiles = Integer.parseInt(args[++i]);
} else if (args[i].equals("-fileSize") || args[i].equals("-size")) { } else if (args[i].equalsIgnoreCase("-filesize")
|| args[i].equalsIgnoreCase("-size")) {
nrBytes = parseSize(args[++i]); nrBytes = parseSize(args[++i]);
} else if (args[i].equals("-skipSize")) { } else if (args[i].equalsIgnoreCase("-skipsize")) {
skipSize = parseSize(args[++i]); skipSize = parseSize(args[++i]);
} else if (args[i].equals("-bufferSize")) { } else if (args[i].equalsIgnoreCase("-buffersize")) {
bufferSize = Integer.parseInt(args[++i]); bufferSize = Integer.parseInt(args[++i]);
} else if (args[i].equals("-resFile")) { } else if (args[i].equalsIgnoreCase("-resfile")) {
resFileName = args[++i]; resFileName = args[++i];
} else { } else {
System.err.println("Illegal argument: " + args[i]); System.err.println("Illegal argument: " + args[i]);