HBASE-17357 FIX PerformanceEvaluation parameters parsing triggers NPE.
check command name is not null, if null print usage and exit Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
parent
f7d1d25fd7
commit
c64236584b
|
@ -2145,6 +2145,12 @@ public class PerformanceEvaluation extends Configured implements Tool {
|
|||
throw new IllegalArgumentException("Number of clients must be > 0");
|
||||
}
|
||||
|
||||
// cmdName should not be null, print help and exit
|
||||
if (opts.cmdName == null) {
|
||||
printUsage();
|
||||
return errCode;
|
||||
}
|
||||
|
||||
Class<? extends Test> cmdClass = determineCommandClass(opts.cmdName);
|
||||
if (cmdClass != null) {
|
||||
runTest(cmdClass, opts);
|
||||
|
|
Loading…
Reference in New Issue