You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2016/10/24 14:27:51 UTC

[1/2] hbase git commit: HBASE-16934 Revert ITBLL misconfiguration check that results in NPE.

Repository: hbase
Updated Branches:
  refs/heads/0.98 09b89eedb -> f475e54be
  refs/heads/branch-1.1 b437a61db -> 51522c14b


HBASE-16934 Revert ITBLL misconfiguration check that results in NPE.

Revert "HBASE-16562 ITBLL should fail to start if misconfigured"

This reverts commit 6e076d940f8882d6ac096f6bb2ebdf05feeb4218.


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

Branch: refs/heads/branch-1.1
Commit: 51522c14bc5488e0a549fe87c450591b0a69c845
Parents: b437a61
Author: Sean Busbey <bu...@apache.org>
Authored: Mon Oct 24 09:24:54 2016 -0500
Committer: Sean Busbey <bu...@apache.org>
Committed: Mon Oct 24 09:24:54 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/51522c14/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 a06e91d..f3d8360 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
@@ -116,7 +116,6 @@ import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
 import org.apache.hadoop.mapreduce.task.TaskAttemptContextImpl;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
-import org.jruby.RubyProcess;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -258,11 +257,6 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase {
     public static final String MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY =
         "generator.multiple.columnfamilies";
 
-    public static final String USAGE =  "Usage : " + Generator.class.getSimpleName() +
-            " <num mappers> <num nodes per map> <tmp output dir> [<width> <wrap multiplier> \n" +
-            "where <num nodes per map> should be a multiple of width*wrap multiplier, " +
-            "25M by default \n";
-
     static class GeneratorInputFormat extends InputFormat<BytesWritable,NullWritable> {
       static class GeneratorInputSplit extends InputSplit implements Writable {
         @Override
@@ -505,20 +499,21 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase {
     @Override
     public int run(String[] args) throws Exception {
       if (args.length < 3) {
-        System.err.println(USAGE);
-        return 1;
+        System.out.println("Usage : " + Generator.class.getSimpleName() +
+            " <num mappers> <num nodes per map> <tmp output dir> [<width> <wrap multiplier>]");
+        System.out.println("   where <num nodes per map> should be a multiple of " +
+            " width*wrap multiplier, 25M by default");
+        return 0;
       }
 
       int numMappers = Integer.parseInt(args[0]);
       long numNodes = Long.parseLong(args[1]);
       Path tmpOutput = new Path(args[2]);
       Integer width = (args.length < 4) ? null : Integer.parseInt(args[3]);
-      Integer wrapMultiplier = (args.length < 5) ? null : Integer.parseInt(args[4]);
-      return run(numMappers, numNodes, tmpOutput, width, wrapMultiplier);
+      Integer wrapMuplitplier = (args.length < 5) ? null : Integer.parseInt(args[4]);
+      return run(numMappers, numNodes, tmpOutput, width, wrapMuplitplier);
     }
 
-
-
     protected void createSchema() throws IOException {
       Configuration conf = getConf();
       TableName tableName = getTableName(conf);
@@ -624,22 +619,12 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase {
     }
 
     public int run(int numMappers, long numNodes, Path tmpOutput,
-        Integer width, Integer wrapMultiplier) 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);
+        Integer width, Integer wrapMuplitplier) throws Exception {
+      int ret = runRandomInputGenerator(numMappers, numNodes, tmpOutput, width, wrapMuplitplier);
       if (ret > 0) {
         return ret;
       }
-      return runGenerator(numMappers, numNodes, tmpOutput, width, wrapMultiplier);
+      return runGenerator(numMappers, numNodes, tmpOutput, width, wrapMuplitplier);
     }
   }
 


[2/2] hbase git commit: HBASE-16934 Revert ITBLL misconfiguration check that results in NPE.

Posted by bu...@apache.org.
HBASE-16934 Revert ITBLL misconfiguration check that results in NPE.

Revert "HBASE-16562 ITBLL should fail to start if misconfigured"

This reverts commit 66a82af9f47230b1972a32bea50beb785fb7997a.


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

Branch: refs/heads/0.98
Commit: f475e54bef96a3817e4807c8bd21f841d1492b2a
Parents: 09b89ee
Author: Sean Busbey <bu...@apache.org>
Authored: Mon Oct 24 09:26:21 2016 -0500
Committer: Sean Busbey <bu...@apache.org>
Committed: Mon Oct 24 09:26:21 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/f475e54b/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 8f7539b..d0df043 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
@@ -218,11 +218,6 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase {
 
     private static final Log LOG = LogFactory.getLog(Generator.class);
 
-    public static final String USAGE =  "Usage : " + Generator.class.getSimpleName() +
-            " <num mappers> <num nodes per map> <tmp output dir> [<width> <wrap multiplier> \n" +
-            "where <num nodes per map> should be a multiple of width*wrap multiplier, " +
-            "25M by default \n";
-
     static class GeneratorInputFormat extends InputFormat<BytesWritable,NullWritable> {
       static class GeneratorInputSplit extends InputSplit implements Writable {
         @Override
@@ -439,20 +434,21 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase {
     @Override
     public int run(String[] args) throws Exception {
       if (args.length < 3) {
-        System.err.println(USAGE);
-        return 1;
+        System.out.println("Usage : " + Generator.class.getSimpleName() +
+            " <num mappers> <num nodes per map> <tmp output dir> [<width> <wrap multiplier>]");
+        System.out.println("   where <num nodes per map> should be a multiple of " +
+            " width*wrap multiplier, 25M by default");
+        return 0;
       }
 
       int numMappers = Integer.parseInt(args[0]);
       long numNodes = Long.parseLong(args[1]);
       Path tmpOutput = new Path(args[2]);
       Integer width = (args.length < 4) ? null : Integer.parseInt(args[3]);
-      Integer wrapMultiplier = (args.length < 5) ? null : Integer.parseInt(args[4]);
-      return run(numMappers, numNodes, tmpOutput, width, wrapMultiplier);
+      Integer wrapMuplitplier = (args.length < 5) ? null : Integer.parseInt(args[4]);
+      return run(numMappers, numNodes, tmpOutput, width, wrapMuplitplier);
     }
 
-
-
     protected void createSchema() throws IOException {
       Configuration conf = getConf();
       HBaseAdmin admin = new HBaseAdmin(conf);
@@ -553,22 +549,12 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase {
     }
 
     public int run(int numMappers, long numNodes, Path tmpOutput,
-        Integer width, Integer wrapMultiplier) 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);
+        Integer width, Integer wrapMuplitplier) throws Exception {
+      int ret = runRandomInputGenerator(numMappers, numNodes, tmpOutput, width, wrapMuplitplier);
       if (ret > 0) {
         return ret;
       }
-      return runGenerator(numMappers, numNodes, tmpOutput, width, wrapMultiplier);
+      return runGenerator(numMappers, numNodes, tmpOutput, width, wrapMuplitplier);
     }
   }