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 24586d7f82c..fe3c5e850d0 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 @@ -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 cmdClass = determineCommandClass(opts.cmdName); if (cmdClass != null) { runTest(cmdClass, opts);