diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java index 52424b30d81..193b4ee3bfc 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java @@ -1789,7 +1789,7 @@ public class PerformanceEvaluation extends Configured implements Tool { continue; } - final String noOfTags = "--nooftags="; + final String noOfTags = "--numoftags="; if (cmd.startsWith(noOfTags)) { opts.noOfTags = Integer.parseInt(cmd.substring(noOfTags.length())); continue; @@ -1879,6 +1879,11 @@ public class PerformanceEvaluation extends Configured implements Tool { opts = calculateRowsAndSize(opts); break; } + + // Not matching any option or command. + System.err.println("Error: Wrong option or command: " + cmd); + args.add(cmd); + break; } return opts; } @@ -1916,10 +1921,11 @@ public class PerformanceEvaluation extends Configured implements Tool { argv.addAll(Arrays.asList(args)); TestOptions opts = parseOpts(argv); - // args remainting, print help and exit + // args remaining, print help and exit if (!argv.isEmpty()) { errCode = 0; printUsage(); + return errCode; } // must run at least 1 client