kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject kylin git commit: KYLIN-1343 fix Job test cases running in local mode
Date Sun, 24 Jan 2016 01:20:07 GMT
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging 2bd3b4ed8 -> dfdeb92ec


KYLIN-1343 fix Job test cases running in local mode


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

Branch: refs/heads/1.x-staging
Commit: dfdeb92ecc9fa89b0bc488e2f355eb7698537ef7
Parents: 2bd3b4e
Author: Yang Li <liyang@apache.org>
Authored: Sun Jan 24 09:18:25 2016 +0800
Committer: Yang Li <liyang@apache.org>
Committed: Sun Jan 24 09:18:33 2016 +0800

----------------------------------------------------------------------
 .../kylin/job/hadoop/cube/BaseCuboidJobTest.java    | 16 ++++++++++------
 .../job/hadoop/cube/KeyDistributionJobTest.java     |  4 +---
 .../kylin/job/hadoop/cube/MergeCuboidJobTest.java   |  6 +-----
 .../kylin/job/hadoop/cube/NDCuboidJobTest.java      |  9 ++-------
 .../hadoop/cube/RangeKeyDistributionJobTest.java    |  6 +-----
 .../kylin/job/hadoop/hbase/CreateHTableTest.java    |  6 +++---
 .../kylin/job/tools/ColumnCardinalityJobTest.java   |  5 ++---
 7 files changed, 20 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/dfdeb92e/job/src/test/java/org/apache/kylin/job/hadoop/cube/BaseCuboidJobTest.java
----------------------------------------------------------------------
diff --git a/job/src/test/java/org/apache/kylin/job/hadoop/cube/BaseCuboidJobTest.java b/job/src/test/java/org/apache/kylin/job/hadoop/cube/BaseCuboidJobTest.java
index 1775eae..8d22efb 100644
--- a/job/src/test/java/org/apache/kylin/job/hadoop/cube/BaseCuboidJobTest.java
+++ b/job/src/test/java/org/apache/kylin/job/hadoop/cube/BaseCuboidJobTest.java
@@ -31,18 +31,22 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class BaseCuboidJobTest extends LocalFileMetadataTestCase {
+    
+    public static void setLocalMR(Configuration conf) {
+        conf.set("fs.default.name", "file:///");
+        conf.set("mapreduce.framework.name", "local");
+        conf.set("mapreduce.application.framework.path", "");
+
+        // for local runner out-of-memory issue
+        conf.set("mapreduce.task.io.sort.mb", "10");
+    }
 
     private Configuration conf;
 
     @Before
     public void setup() throws Exception {
         conf = new Configuration();
-        conf.set("fs.default.name", "file:///");
-        conf.set("mapred.job.tracker", "local");
-        conf.set("mapreduce.application.framework.path", "");
-
-        // for local runner out-of-memory issue
-        conf.set("mapreduce.task.io.sort.mb", "10");
+        BaseCuboidJobTest.setLocalMR(conf);
 
         createTestMetadata();
     }

http://git-wip-us.apache.org/repos/asf/kylin/blob/dfdeb92e/job/src/test/java/org/apache/kylin/job/hadoop/cube/KeyDistributionJobTest.java
----------------------------------------------------------------------
diff --git a/job/src/test/java/org/apache/kylin/job/hadoop/cube/KeyDistributionJobTest.java
b/job/src/test/java/org/apache/kylin/job/hadoop/cube/KeyDistributionJobTest.java
index f5b3b7d..6f7db6a 100644
--- a/job/src/test/java/org/apache/kylin/job/hadoop/cube/KeyDistributionJobTest.java
+++ b/job/src/test/java/org/apache/kylin/job/hadoop/cube/KeyDistributionJobTest.java
@@ -60,9 +60,7 @@ package org.apache.kylin.job.hadoop.cube;
 //    @Before
 //    public void setup() throws IOException {
 //        conf = new Configuration();
-//        conf.set("fs.default.name", "file:///");
-//        conf.set("mapred.job.tracker", "local");
-//        conf.set("mapreduce.application.framework.path", "");
+//        BaseCuboidJobTest.setLocalMR(conf);
 //    }
 //
 //    @Test

http://git-wip-us.apache.org/repos/asf/kylin/blob/dfdeb92e/job/src/test/java/org/apache/kylin/job/hadoop/cube/MergeCuboidJobTest.java
----------------------------------------------------------------------
diff --git a/job/src/test/java/org/apache/kylin/job/hadoop/cube/MergeCuboidJobTest.java b/job/src/test/java/org/apache/kylin/job/hadoop/cube/MergeCuboidJobTest.java
index 012b3a1..6c17c69 100644
--- a/job/src/test/java/org/apache/kylin/job/hadoop/cube/MergeCuboidJobTest.java
+++ b/job/src/test/java/org/apache/kylin/job/hadoop/cube/MergeCuboidJobTest.java
@@ -38,12 +38,8 @@ public class MergeCuboidJobTest extends LocalFileMetadataTestCase {
     @Before
     public void setup() throws Exception {
         conf = new Configuration();
-        conf.set("fs.default.name", "file:///");
-        conf.set("mapred.job.tracker", "local");
-        conf.set("mapreduce.application.framework.path", "");
+        BaseCuboidJobTest.setLocalMR(conf);
 
-        // for local runner out-of-memory issue
-        conf.set("mapreduce.task.io.sort.mb", "10");
         createTestMetadata();
     }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/dfdeb92e/job/src/test/java/org/apache/kylin/job/hadoop/cube/NDCuboidJobTest.java
----------------------------------------------------------------------
diff --git a/job/src/test/java/org/apache/kylin/job/hadoop/cube/NDCuboidJobTest.java b/job/src/test/java/org/apache/kylin/job/hadoop/cube/NDCuboidJobTest.java
index 5ba3ec6..8b5e78d 100644
--- a/job/src/test/java/org/apache/kylin/job/hadoop/cube/NDCuboidJobTest.java
+++ b/job/src/test/java/org/apache/kylin/job/hadoop/cube/NDCuboidJobTest.java
@@ -18,7 +18,7 @@
 
 package org.apache.kylin.job.hadoop.cube;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.*;
 
 import java.io.File;
 
@@ -37,12 +37,7 @@ public class NDCuboidJobTest extends LocalFileMetadataTestCase {
     @Before
     public void setup() throws Exception {
         conf = new Configuration();
-        conf.set("fs.default.name", "file:///");
-        conf.set("mapred.job.tracker", "local");
-        conf.set("mapreduce.application.framework.path", "");
-
-        // for local runner out-of-memory issue
-        conf.set("mapreduce.task.io.sort.mb", "10");
+        BaseCuboidJobTest.setLocalMR(conf);
 
         createTestMetadata();
     }

http://git-wip-us.apache.org/repos/asf/kylin/blob/dfdeb92e/job/src/test/java/org/apache/kylin/job/hadoop/cube/RangeKeyDistributionJobTest.java
----------------------------------------------------------------------
diff --git a/job/src/test/java/org/apache/kylin/job/hadoop/cube/RangeKeyDistributionJobTest.java
b/job/src/test/java/org/apache/kylin/job/hadoop/cube/RangeKeyDistributionJobTest.java
index 586bdf0..8e0c3bb 100644
--- a/job/src/test/java/org/apache/kylin/job/hadoop/cube/RangeKeyDistributionJobTest.java
+++ b/job/src/test/java/org/apache/kylin/job/hadoop/cube/RangeKeyDistributionJobTest.java
@@ -41,12 +41,8 @@ public class RangeKeyDistributionJobTest extends LocalFileMetadataTestCase
{
     @Before
     public void setup() throws Exception {
         conf = new Configuration();
-        conf.set("fs.default.name", "file:///");
-        conf.set("mapred.job.tracker", "local");
-        conf.set("mapreduce.application.framework.path", "");
+        BaseCuboidJobTest.setLocalMR(conf);
 
-        // for local runner out-of-memory issue
-        conf.set("mapreduce.task.io.sort.mb", "10");
         createTestMetadata();
     }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/dfdeb92e/job/src/test/java/org/apache/kylin/job/hadoop/hbase/CreateHTableTest.java
----------------------------------------------------------------------
diff --git a/job/src/test/java/org/apache/kylin/job/hadoop/hbase/CreateHTableTest.java b/job/src/test/java/org/apache/kylin/job/hadoop/hbase/CreateHTableTest.java
index a87c66b..365a0d8 100644
--- a/job/src/test/java/org/apache/kylin/job/hadoop/hbase/CreateHTableTest.java
+++ b/job/src/test/java/org/apache/kylin/job/hadoop/hbase/CreateHTableTest.java
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertEquals;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.kylin.common.util.LocalFileMetadataTestCase;
+import org.apache.kylin.job.hadoop.cube.BaseCuboidJobTest;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -39,9 +40,8 @@ public class CreateHTableTest extends LocalFileMetadataTestCase {
     @Before
     public void setup() throws Exception {
         conf = new Configuration();
-        conf.set("fs.default.name", "file:///");
-        conf.set("mapred.job.tracker", "local");
-        conf.set("mapreduce.application.framework.path", "");
+        BaseCuboidJobTest.setLocalMR(conf);
+
         this.createTestMetadata();
 
     }

http://git-wip-us.apache.org/repos/asf/kylin/blob/dfdeb92e/job/src/test/java/org/apache/kylin/job/tools/ColumnCardinalityJobTest.java
----------------------------------------------------------------------
diff --git a/job/src/test/java/org/apache/kylin/job/tools/ColumnCardinalityJobTest.java b/job/src/test/java/org/apache/kylin/job/tools/ColumnCardinalityJobTest.java
index 9d95a88..2c2f16f 100644
--- a/job/src/test/java/org/apache/kylin/job/tools/ColumnCardinalityJobTest.java
+++ b/job/src/test/java/org/apache/kylin/job/tools/ColumnCardinalityJobTest.java
@@ -27,6 +27,7 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileUtil;
 import org.apache.hadoop.util.ToolRunner;
 import org.apache.kylin.job.hadoop.cardinality.HiveColumnCardinalityJob;
+import org.apache.kylin.job.hadoop.cube.BaseCuboidJobTest;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -43,9 +44,7 @@ public class ColumnCardinalityJobTest {
     @Before
     public void setup() throws IOException {
         conf = new Configuration();
-        conf.set("fs.default.name", "file:///");
-        conf.set("mapred.job.tracker", "local");
-        conf.set("mapreduce.application.framework.path", "");
+        BaseCuboidJobTest.setLocalMR(conf);
     }
 
     @Test


Mime
View raw message