hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-17357 FIX PerformanceEvaluation parameters parsing triggers NPE.
Date Sat, 21 Jan 2017 06:53:51 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 f7d1d25fd -> c64236584


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>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c6423658
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c6423658
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c6423658

Branch: refs/heads/branch-1
Commit: c64236584b527d4a42f81a11c8623f30803d0b64
Parents: f7d1d25
Author: Dave Navarro <mrdavenavarro@gmail.com>
Authored: Fri Jan 20 10:41:36 2017 -0600
Committer: Michael Stack <stack@apache.org>
Committed: Fri Jan 20 22:53:23 2017 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/PerformanceEvaluation.java    | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/c6423658/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
----------------------------------------------------------------------
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 24586d7..fe3c5e8 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<? extends Test> cmdClass = determineCommandClass(opts.cmdName);
       if (cmdClass != null) {
         runTest(cmdClass, opts);


Mime
View raw message