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 2016/04/29 16:53:46 UTC

kylin git commit: KYLIN-1077 fix a bug in BuildCubeWithEngine

Repository: kylin
Updated Branches:
  refs/heads/master 8f584dd41 -> 5da8ea857


KYLIN-1077 fix a bug in BuildCubeWithEngine

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

Branch: refs/heads/master
Commit: 5da8ea857a8ed5d29add343a8951d151a1df713d
Parents: 8f584dd
Author: shaofengshi <sh...@apache.org>
Authored: Fri Apr 29 22:49:33 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Fri Apr 29 22:53:32 2016 +0800

----------------------------------------------------------------------
 .../kylin/provision/BuildCubeWithEngine.java    | 34 +++++++++++---------
 1 file changed, 18 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/5da8ea85/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithEngine.java
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithEngine.java b/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithEngine.java
index 0cb4aea..2ca6c5f 100644
--- a/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithEngine.java
+++ b/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithEngine.java
@@ -242,7 +242,8 @@ public class BuildCubeWithEngine {
     @SuppressWarnings("unused")
     // called by reflection
     private List<String> testInnerJoinCubeWithSlr() throws Exception {
-        clearSegment("test_kylin_cube_with_slr_empty");
+        final String cubeName = "test_kylin_cube_with_slr_empty";
+        clearSegment(cubeName);
         SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");
         f.setTimeZone(TimeZone.getTimeZone("GMT"));
         long date1 = 0;
@@ -251,10 +252,10 @@ public class BuildCubeWithEngine {
         List<String> result = Lists.newArrayList();
 
         if (fastBuildMode) {
-            result.add(buildSegment("test_kylin_cube_with_slr_empty", date1, date3));
+            result.add(buildSegment(cubeName, date1, date3));
         } else {
-            result.add(buildSegment("test_kylin_cube_with_slr_empty", date1, date2));
-            result.add(buildSegment("test_kylin_cube_with_slr_empty", date2, date3));//empty segment
+            result.add(buildSegment(cubeName, date1, date2));
+            result.add(buildSegment(cubeName, date2, date3));//empty segment
         }
         return result;
     }
@@ -263,7 +264,8 @@ public class BuildCubeWithEngine {
     // called by reflection
     private List<String> testInnerJoinCubeWithoutSlr() throws Exception {
 
-        clearSegment("test_kylin_cube_without_slr_empty");
+        final String cubeName = "test_kylin_cube_without_slr_empty";
+        clearSegment(cubeName);
         SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");
         f.setTimeZone(TimeZone.getTimeZone("GMT"));
         long date1 = 0;
@@ -273,12 +275,12 @@ public class BuildCubeWithEngine {
         List<String> result = Lists.newArrayList();
 
         if (fastBuildMode) {
-            result.add(buildSegment("test_kylin_cube_without_slr_empty", date1, date4));
+            result.add(buildSegment(cubeName, date1, date4));
         } else {
-            result.add(buildSegment("test_kylin_cube_without_slr_empty", date1, date2));
-            result.add(buildSegment("test_kylin_cube_without_slr_empty", date2, date3));
-            result.add(buildSegment("test_kylin_cube_without_slr_empty", date3, date4));
-            result.add(mergeSegment("test_kylin_cube_without_slr_empty", date1, date3));//don't merge all segments
+            result.add(buildSegment(cubeName, date1, date2));
+            result.add(buildSegment(cubeName, date2, date3));
+            result.add(buildSegment(cubeName, date3, date4));
+            result.add(mergeSegment(cubeName, date1, date3));//don't merge all segments
         }
         return result;
 
@@ -299,12 +301,12 @@ public class BuildCubeWithEngine {
         long date4 = f.parse("2023-01-01").getTime();
 
         if (fastBuildMode) {
-            result.add(buildSegment("test_kylin_cube_without_slr_left_join_empty", date1, date4));
+            result.add(buildSegment(cubeName, date1, date4));
         } else {
-            result.add(buildSegment("test_kylin_cube_without_slr_left_join_empty", date1, date2));
-            result.add(buildSegment("test_kylin_cube_without_slr_left_join_empty", date2, date3));
-            result.add(buildSegment("test_kylin_cube_without_slr_left_join_empty", date3, date4));//empty segment
-            result.add(mergeSegment("test_kylin_cube_without_slr_left_join_empty", date1, date3));//don't merge all segments
+            result.add(buildSegment(cubeName, date1, date2));
+            result.add(buildSegment(cubeName, date2, date3));
+            result.add(buildSegment(cubeName, date3, date4));//empty segment
+            result.add(mergeSegment(cubeName, date1, date3));//don't merge all segments
         }
 
         return result;
@@ -324,7 +326,7 @@ public class BuildCubeWithEngine {
         long date1 = cubeManager.getCube(cubeName).getDescriptor().getPartitionDateStart();
         long date4 = f.parse("2023-01-01").getTime();
 
-        result.add(buildSegment("test_kylin_cube_without_slr_left_join_empty", date1, date4));
+        result.add(buildSegment(cubeName, date1, date4));
 
         return result;