kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [1/3] incubator-kudu git commit: [java] Integration test for ITBLL
Date Thu, 25 Feb 2016 22:11:06 GMT
Repository: incubator-kudu
Updated Branches:
  refs/heads/master 8514b9e0f -> d64ee4a2d


[java] Integration test for ITBLL

Test runs for 40 seconds unfortunately since it's multiple MR jobs,
but only does when using "mvn verify".

Change-Id: I1aeed74f7ab932feb99f6143c26bde7a5d7f1ba4
Reviewed-on: http://gerrit.cloudera.org:8080/2214
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <adar@cloudera.com>


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

Branch: refs/heads/master
Commit: b48d9f633d21fce7d45c94db39750aff460747c5
Parents: 8514b9e
Author: Jean-Daniel Cryans <jdcryans@apache.org>
Authored: Wed Feb 17 13:13:16 2016 -0800
Committer: Jean-Daniel Cryans <jdcryans@gerrit.cloudera.org>
Committed: Tue Feb 23 23:05:52 2016 +0000

----------------------------------------------------------------------
 .../tools/IntegrationTestBigLinkedList.java     |  8 +--
 .../tools/ITIntegrationTestBigLinkedList.java   | 69 ++++++++++++++++++++
 2 files changed, 73 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/b48d9f63/java/kudu-client-tools/src/main/java/org/kududb/mapreduce/tools/IntegrationTestBigLinkedList.java
----------------------------------------------------------------------
diff --git a/java/kudu-client-tools/src/main/java/org/kududb/mapreduce/tools/IntegrationTestBigLinkedList.java
b/java/kudu-client-tools/src/main/java/org/kududb/mapreduce/tools/IntegrationTestBigLinkedList.java
index 1024f50..64bf30b 100644
--- a/java/kudu-client-tools/src/main/java/org/kududb/mapreduce/tools/IntegrationTestBigLinkedList.java
+++ b/java/kudu-client-tools/src/main/java/org/kududb/mapreduce/tools/IntegrationTestBigLinkedList.java
@@ -984,8 +984,8 @@ public class IntegrationTestBigLinkedList extends Configured implements
Tool {
     public int run(String[] args) throws Exception {
       if (args.length < 6) {
         System.err.println("Usage: Loop <num iterations> <num mappers> <num
nodes per mapper> " +
-            "<output dir> <num reducers> [<width> <wrap multiplier>
<start expected nodes>" +
-            "<num_verify_retries>]");
+            "<num_tablets> <output dir> <num reducers> [<width> <wrap
multiplier>" +
+            "<start expected nodes> <num_verify_retries>]");
         return 1;
       }
       LOG.info("Running Loop with args:" + Arrays.deepToString(args));
@@ -996,8 +996,8 @@ public class IntegrationTestBigLinkedList extends Configured implements
Tool {
       int numTablets = Integer.parseInt(args[3]);
       String outputDir = args[4];
       int numReducers = Integer.parseInt(args[5]);
-      int width = (args.length < 6) ? null : Integer.parseInt(args[6]);
-      int wrapMuplitplier = (args.length < 8) ? null : Integer.parseInt(args[7]);
+      Integer width = (args.length < 7) ? null : Integer.parseInt(args[6]);
+      Integer wrapMuplitplier = (args.length < 8) ? null : Integer.parseInt(args[7]);
       long expectedNumNodes = (args.length < 9) ? 0 : Long.parseLong(args[8]);
       int numVerifyRetries = (args.length < 10) ? 3 : Integer.parseInt(args[9]);
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/b48d9f63/java/kudu-client-tools/src/test/java/org/kududb/mapreduce/tools/ITIntegrationTestBigLinkedList.java
----------------------------------------------------------------------
diff --git a/java/kudu-client-tools/src/test/java/org/kududb/mapreduce/tools/ITIntegrationTestBigLinkedList.java
b/java/kudu-client-tools/src/test/java/org/kududb/mapreduce/tools/ITIntegrationTestBigLinkedList.java
new file mode 100644
index 0000000..311c5ee
--- /dev/null
+++ b/java/kudu-client-tools/src/test/java/org/kududb/mapreduce/tools/ITIntegrationTestBigLinkedList.java
@@ -0,0 +1,69 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.kududb.mapreduce.tools;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.util.ToolRunner;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Test;
+import org.kududb.client.BaseKuduTest;
+import org.kududb.mapreduce.CommandLineParser;
+import org.kududb.mapreduce.HadoopTestingUtility;
+
+public class ITIntegrationTestBigLinkedList extends BaseKuduTest {
+
+  private static final HadoopTestingUtility HADOOP_UTIL = new HadoopTestingUtility();
+
+  @AfterClass
+  public static void tearDownAfterClass() throws Exception {
+    try {
+      BaseKuduTest.tearDownAfterClass();
+    } finally {
+      HADOOP_UTIL.cleanup();
+    }
+  }
+
+  @Test
+  public void test() throws Exception {
+    Configuration conf = new Configuration();
+    HADOOP_UTIL.setupAndGetTestDir(
+        ITIntegrationTestBigLinkedList.class.getName(),conf).getAbsolutePath();
+
+    String[] args = new String[] {
+        "-D" + CommandLineParser.MASTER_ADDRESSES_KEY + "=" + getMasterAddresses(),
+        "Loop",
+        "2", // Two iterations
+        "1", // 1 mapper
+        "2500", // 2.5k rows to insert
+        "1", // 1 tablet
+        "/tmp/itbll", // output dir
+        "1", // 1 reduce
+        "100", // create 100 columns
+        "25", // wrap them together after 25 rows
+        "0"
+    };
+    int ret = ToolRunner.run(new IntegrationTestBigLinkedList(), args);
+    Assert.assertEquals(0, ret);
+
+    args[2] = "1"; // Just one iteration this time
+    args[10] = "5000"; // 2 * 2500 from previous run
+    ret = ToolRunner.run(new IntegrationTestBigLinkedList(), args);
+    Assert.assertEquals(0, ret);
+  }
+}


Mime
View raw message