hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chenh...@apache.org
Subject hbase git commit: HBASE-16562 ITBLL should fail to start if misconfigured, addendum
Date Wed, 07 Sep 2016 07:44:39 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 78af20944 -> 7363a7666


HBASE-16562 ITBLL should fail to start if misconfigured, addendum


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

Branch: refs/heads/master
Commit: 7363a76660583492c5c037113ac06cfef92e034e
Parents: 78af209
Author: chenheng <chenheng@apache.org>
Authored: Wed Sep 7 15:29:55 2016 +0800
Committer: chenheng <chenheng@apache.org>
Committed: Wed Sep 7 15:29:55 2016 +0800

----------------------------------------------------------------------
 .../test/IntegrationTestBigLinkedList.java      | 21 ++++++++++----------
 1 file changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/7363a766/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
index 41aa128..07c5cf2 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
@@ -676,17 +676,6 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase
{
         Integer width = (args.length < 4) ? null : Integer.parseInt(args[3]);
         Integer wrapMultiplier = (args.length < 5) ? null : Integer.parseInt(args[4]);
         Integer numWalkers = (args.length < 6) ? null : Integer.parseInt(args[5]);
-
-        long wrap = (long)width*wrapMultiplier;
-        if (wrap < numNodes && numNodes % wrap != 0) {
-          /**
-           *  numNodes should be a multiple of width*wrapMultiplier.
-           *  If numNodes less than wrap, wrap will be set to be equal with numNodes,
-           *  See {@link GeneratorMapper#setup(Mapper.Context)}
-           * */
-          System.err.println(USAGE);
-          return 1;
-        }
         return run(numMappers, numNodes, tmpOutput, width, wrapMultiplier, numWalkers);
       } catch (NumberFormatException e) {
         System.err.println("Parsing generator arguments failed: " + e.getMessage());
@@ -818,6 +807,16 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase
{
     public int run(int numMappers, long numNodes, Path tmpOutput,
         Integer width, Integer wrapMultiplier, Integer numWalkers)
         throws Exception {
+      long wrap = (long)width*wrapMultiplier;
+      if (wrap < numNodes && numNodes % wrap != 0) {
+        /**
+         *  numNodes should be a multiple of width*wrapMultiplier.
+         *  If numNodes less than wrap, wrap will be set to be equal with numNodes,
+         *  See {@link GeneratorMapper#setup(Mapper.Context)}
+         * */
+        System.err.println(USAGE);
+        return 1;
+      }
       int ret = runRandomInputGenerator(numMappers, numNodes, tmpOutput, width, wrapMultiplier,
           numWalkers);
       if (ret > 0) {


Mime
View raw message