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/10/26 10:07:50 UTC

[04/45] 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/ac10f5dc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/ac10f5dc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/ac10f5dc

Branch: refs/heads/master
Commit: ac10f5dc44f0a3478a9a0e028c49255c11362d11
Parents: 66ae35a
Author: shaofengshi <sh...@apache.org>
Authored: Mon Sep 21 17:20:39 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Mon Sep 21 17:21:03 2015 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/job/BuildCubeWithEngineTest.java     | 6 ++++--
 .../test/java/org/apache/kylin/job/BuildIIWithEngineTest.java  | 4 +++-
 .../org/apache/kylin/metadata/tool/SandboxMetastoreCLI.java    | 4 +++-
 pom.xml                                                        | 4 ----
 server/src/main/java/org/apache/kylin/rest/DebugTomcat.java    | 5 +++--
 5 files changed, 13 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ac10f5dc/job/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
----------------------------------------------------------------------
diff --git a/job/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java b/job/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
index 28c9061..e8162fe 100644
--- a/job/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
+++ b/job/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
@@ -86,8 +86,10 @@ public class BuildCubeWithEngineTest {
     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(KylinConfig.KYLIN_CONF, "../examples/test_case_data/sandbox");
-        System.setProperty("hdp.version", "2.2.4.2-2"); // mapred-site.xml ref this
+        System.setProperty(KylinConfig.KYLIN_CONF, "../examples/test_case_data/sandbox"); 
+        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/ac10f5dc/job/src/test/java/org/apache/kylin/job/BuildIIWithEngineTest.java
----------------------------------------------------------------------
diff --git a/job/src/test/java/org/apache/kylin/job/BuildIIWithEngineTest.java b/job/src/test/java/org/apache/kylin/job/BuildIIWithEngineTest.java
index bcacaa6..4d039cf 100644
--- a/job/src/test/java/org/apache/kylin/job/BuildIIWithEngineTest.java
+++ b/job/src/test/java/org/apache/kylin/job/BuildIIWithEngineTest.java
@@ -94,7 +94,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/ac10f5dc/metadata/src/test/java/org/apache/kylin/metadata/tool/SandboxMetastoreCLI.java
----------------------------------------------------------------------
diff --git a/metadata/src/test/java/org/apache/kylin/metadata/tool/SandboxMetastoreCLI.java b/metadata/src/test/java/org/apache/kylin/metadata/tool/SandboxMetastoreCLI.java
index b0cbe2e..5ecedad 100644
--- a/metadata/src/test/java/org/apache/kylin/metadata/tool/SandboxMetastoreCLI.java
+++ b/metadata/src/test/java/org/apache/kylin/metadata/tool/SandboxMetastoreCLI.java
@@ -42,7 +42,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();

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ac10f5dc/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c614478..1f82807 100644
--- a/pom.xml
+++ b/pom.xml
@@ -789,10 +789,6 @@
                                     <value>true</value>
                                 </property>
                                 <property>
-                                    <name>hdp.version</name>
-                                    <value>2.2.0.0-2041</value>
-                                </property>
-                                <property>
                                     <name>buildCubeUsingProvidedData</name>
                                     <value>false</value>
                                 </property>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ac10f5dc/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 038dc82..8efbae8 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) {