You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2015/09/29 03:04:06 UTC

[15/27] incubator-kylin git commit: KYLIN-1037 Remove hardcoded "hdp.version" from regression tests

KYLIN-1037 Remove hardcoded "hdp.version" from regression tests


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

Branch: refs/heads/2.x-staging
Commit: 2d14bee1a7aad0bcb8b25a62b054d003869260e0
Parents: ea86147
Author: shaofengshi <sh...@apache.org>
Authored: Mon Sep 21 17:24:23 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Tue Sep 29 09:01:53 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/engine/spark/BuildCubeWithSparkTest.java   | 5 ++++-
 .../test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java | 5 ++++-
 .../test/java/org/apache/kylin/job/BuildCubeWithStreamTest.java | 5 ++++-
 .../test/java/org/apache/kylin/job/BuildIIWithEngineTest.java   | 4 +++-
 .../test/java/org/apache/kylin/job/BuildIIWithStreamTest.java   | 4 +++-
 .../java/org/apache/kylin/job/DeployLocalMetaToRemoteTest.java  | 4 +++-
 .../org/apache/kylin/job/ITKafkaBasedIIStreamBuilderTest.java   | 4 +++-
 examples/test_case_data/sandbox/kylin.properties                | 2 +-
 server/src/main/java/org/apache/kylin/rest/DebugTomcat.java     | 5 +++--
 .../apache/kylin/storage/hbase/steps/SandboxMetastoreCLI.java   | 4 +++-
 10 files changed, 31 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2d14bee1/assembly/src/test/java/org/apache/kylin/engine/spark/BuildCubeWithSparkTest.java
----------------------------------------------------------------------
diff --git a/assembly/src/test/java/org/apache/kylin/engine/spark/BuildCubeWithSparkTest.java b/assembly/src/test/java/org/apache/kylin/engine/spark/BuildCubeWithSparkTest.java
index de60504..755b1ac 100644
--- a/assembly/src/test/java/org/apache/kylin/engine/spark/BuildCubeWithSparkTest.java
+++ b/assembly/src/test/java/org/apache/kylin/engine/spark/BuildCubeWithSparkTest.java
@@ -78,7 +78,10 @@ public class BuildCubeWithSparkTest {
         logger.info("Adding to classpath: " + new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
         ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
         System.setProperty(KylinConfig.KYLIN_CONF, "../examples/test_case_data/sandbox");
-        //System.setProperty("hdp.version", "2.2.4.2-2"); // mapred-site.xml ref this
+        if (System.getProperty("hdp.version") == null) {
+            throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.2.4.2-2");
+        }
+
     }
 
     @Before

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2d14bee1/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
----------------------------------------------------------------------
diff --git a/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java b/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
index d6d9738..71b5d11 100644
--- a/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
+++ b/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
@@ -85,7 +85,10 @@ public class BuildCubeWithEngineTest {
         logger.info("Adding to classpath: " + new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
         ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
         System.setProperty(KylinConfig.KYLIN_CONF, "../examples/test_case_data/sandbox");
-        //System.setProperty("hdp.version", "2.2.4.2-2"); // mapred-site.xml ref this
+        if (System.getProperty("hdp.version") == null) {
+            throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.2.4.2-2");
+        }
+
     }
 
     @Before

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2d14bee1/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithStreamTest.java
----------------------------------------------------------------------
diff --git a/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithStreamTest.java b/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithStreamTest.java
index 0b42f12..964f972 100644
--- a/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithStreamTest.java
+++ b/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithStreamTest.java
@@ -75,7 +75,10 @@ public class BuildCubeWithStreamTest {
         logger.info("Adding to classpath: " + new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
         ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
         System.setProperty(KylinConfig.KYLIN_CONF, "../examples/test_case_data/sandbox");
-        //System.setProperty("hdp.version", "2.2.4.2-2"); // mapred-site.xml ref this
+        if (System.getProperty("hdp.version") == null) {
+            throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.2.4.2-2");
+        }
+
     }
 
     @Before

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2d14bee1/assembly/src/test/java/org/apache/kylin/job/BuildIIWithEngineTest.java
----------------------------------------------------------------------
diff --git a/assembly/src/test/java/org/apache/kylin/job/BuildIIWithEngineTest.java b/assembly/src/test/java/org/apache/kylin/job/BuildIIWithEngineTest.java
index a824cf5..a3b3db2 100644
--- a/assembly/src/test/java/org/apache/kylin/job/BuildIIWithEngineTest.java
+++ b/assembly/src/test/java/org/apache/kylin/job/BuildIIWithEngineTest.java
@@ -93,7 +93,9 @@ public class BuildIIWithEngineTest {
     public static void beforeClass() throws Exception {
         logger.info("Adding to classpath: " + new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
         ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
-        //System.setProperty("hdp.version", "2.2.4.2-2"); // mapred-site.xml ref this
+        if (System.getProperty("hdp.version") == null) {
+            throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.2.4.2-2");
+        }
     }
 
     @Before

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2d14bee1/assembly/src/test/java/org/apache/kylin/job/BuildIIWithStreamTest.java
----------------------------------------------------------------------
diff --git a/assembly/src/test/java/org/apache/kylin/job/BuildIIWithStreamTest.java b/assembly/src/test/java/org/apache/kylin/job/BuildIIWithStreamTest.java
index 795441a..61cf262 100644
--- a/assembly/src/test/java/org/apache/kylin/job/BuildIIWithStreamTest.java
+++ b/assembly/src/test/java/org/apache/kylin/job/BuildIIWithStreamTest.java
@@ -98,7 +98,9 @@ public class BuildIIWithStreamTest {
     public static void beforeClass() throws Exception {
         logger.info("Adding to classpath: " + new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
         ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
-        //System.setProperty("hdp.version", "2.2.4.2-2"); // mapred-site.xml ref this
+        if (System.getProperty("hdp.version") == null) {
+            throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.2.4.2-2");
+        }
     }
 
     @Before

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2d14bee1/assembly/src/test/java/org/apache/kylin/job/DeployLocalMetaToRemoteTest.java
----------------------------------------------------------------------
diff --git a/assembly/src/test/java/org/apache/kylin/job/DeployLocalMetaToRemoteTest.java b/assembly/src/test/java/org/apache/kylin/job/DeployLocalMetaToRemoteTest.java
index 9d3000e..92c9dae 100644
--- a/assembly/src/test/java/org/apache/kylin/job/DeployLocalMetaToRemoteTest.java
+++ b/assembly/src/test/java/org/apache/kylin/job/DeployLocalMetaToRemoteTest.java
@@ -45,7 +45,9 @@ public class DeployLocalMetaToRemoteTest {
         logger.info("Adding to classpath: " + new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
         ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
         System.setProperty(KylinConfig.KYLIN_CONF, "../examples/test_case_data/sandbox");
-        //System.setProperty("hdp.version", "2.2.4.2-2"); // mapred-site.xml ref this
+        if (System.getProperty("hdp.version") == null) {
+            throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.2.4.2-2");
+        }
     }
 
     @Before

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2d14bee1/assembly/src/test/java/org/apache/kylin/job/ITKafkaBasedIIStreamBuilderTest.java
----------------------------------------------------------------------
diff --git a/assembly/src/test/java/org/apache/kylin/job/ITKafkaBasedIIStreamBuilderTest.java b/assembly/src/test/java/org/apache/kylin/job/ITKafkaBasedIIStreamBuilderTest.java
index 739f35a..e9e6bad 100644
--- a/assembly/src/test/java/org/apache/kylin/job/ITKafkaBasedIIStreamBuilderTest.java
+++ b/assembly/src/test/java/org/apache/kylin/job/ITKafkaBasedIIStreamBuilderTest.java
@@ -60,7 +60,9 @@ public class ITKafkaBasedIIStreamBuilderTest {
     @BeforeClass
     public static void beforeClass() throws Exception {
         ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
-        //System.setProperty("hdp.version", "2.2.4.2-2"); // mapred-site.xml ref this
+        if (System.getProperty("hdp.version") == null) {
+            throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.2.4.2-2");
+        }
     }
 
     @Before

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2d14bee1/examples/test_case_data/sandbox/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/kylin.properties b/examples/test_case_data/sandbox/kylin.properties
index 03df875..9df0909 100644
--- a/examples/test_case_data/sandbox/kylin.properties
+++ b/examples/test_case_data/sandbox/kylin.properties
@@ -16,7 +16,7 @@ kylin.job.mapreduce.default.reduce.input.mb=500
 
 # If true, job engine will not assume that hadoop CLI reside on the same server as it self
 # you will have to specify kylin.job.remote.cli.hostname, kylin.job.remote.cli.username and kylin.job.remote.cli.password
-kylin.job.run.as.remote.cmd=false
+kylin.job.run.as.remote.cmd=true
 
 # Only necessary when kylin.job.run.as.remote.cmd=true
 kylin.job.remote.cli.hostname=sandbox

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2d14bee1/server/src/main/java/org/apache/kylin/rest/DebugTomcat.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/kylin/rest/DebugTomcat.java b/server/src/main/java/org/apache/kylin/rest/DebugTomcat.java
index 4df1ca4..2db3b67 100644
--- a/server/src/main/java/org/apache/kylin/rest/DebugTomcat.java
+++ b/server/src/main/java/org/apache/kylin/rest/DebugTomcat.java
@@ -46,8 +46,9 @@ public class DebugTomcat {
             if (System.getProperty("catalina.home") == null)
                 System.setProperty("catalina.home", ".");
 
-            if (System.getProperty("hdp.version") == null)
-                System.setProperty("hdp.version", "2.2.4.2-2"); // mapred-site.xml ref this
+            if (System.getProperty("hdp.version") == null) {
+                throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.2.4.2-2");
+            }
 
             // workaround for job submission from win to linux -- https://issues.apache.org/jira/browse/MAPREDUCE-4052
             if (Shell.WINDOWS) {

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2d14bee1/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/steps/SandboxMetastoreCLI.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/steps/SandboxMetastoreCLI.java b/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/steps/SandboxMetastoreCLI.java
index ac9d0c2..fadab1a 100644
--- a/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/steps/SandboxMetastoreCLI.java
+++ b/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/steps/SandboxMetastoreCLI.java
@@ -41,7 +41,9 @@ public class SandboxMetastoreCLI {
         logger.info("Adding to classpath: " + new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
         ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
         System.setProperty(KylinConfig.KYLIN_CONF, "../examples/test_case_data/sandbox");
-        //System.setProperty("hdp.version", "2.2.4.2-2"); // mapred-site.xml ref this
+        if (System.getProperty("hdp.version") == null) {
+            throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.2.4.2-2");
+        }
 
         if (args.length < 2) {
             printUsage();