You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ma...@apache.org on 2015/11/16 03:05:39 UTC

incubator-kylin git commit: temp

Repository: incubator-kylin
Updated Branches:
  refs/heads/KYLIN-1126 747b1328c -> e873ba341


temp


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

Branch: refs/heads/KYLIN-1126
Commit: e873ba34146d2b7eb52c879e33b40dcfb05a0c5e
Parents: 747b132
Author: honma <ho...@ebay.com>
Authored: Thu Nov 12 11:24:17 2015 +0800
Committer: honma <ho...@ebay.com>
Committed: Mon Nov 16 10:09:53 2015 +0800

----------------------------------------------------------------------
 .../kylin/job/BuildCubeWithEngineTest.java      | 31 ++++++++++----------
 .../org/apache/kylin/cube/CubeManagerTest.java  | 10 -------
 ...test_kylin_cube_with_slr_left_join_desc.json |  4 +--
 ...t_kylin_cube_without_slr_left_join_desc.json |  6 ++--
 4 files changed, 20 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e873ba34/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 1de0c6a..75a6c54 100644
--- a/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
+++ b/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
@@ -193,7 +193,7 @@ public class BuildCubeWithEngineTest {
                 return (List<String>) method.invoke(BuildCubeWithEngineTest.this);
             } catch (Exception e) {
                 logger.error(e.getMessage());
-                return null;
+                throw e;
             } finally {
                 countDownLatch.countDown();
             }
@@ -207,18 +207,15 @@ public class BuildCubeWithEngineTest {
         SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");
         f.setTimeZone(TimeZone.getTimeZone("GMT"));
         long date1 = 0;
-        long date2 = f.parse("2013-01-01").getTime();
-        long date3 = f.parse("2013-07-01").getTime();
-        long date4 = f.parse("2022-01-01").getTime();
+        long date2 = f.parse("2015-01-01").getTime();
+        long date3 = f.parse("2022-01-01").getTime();
         List<String> result = Lists.newArrayList();
 
         if (fastBuildMode) {
-            result.add(buildSegment("test_kylin_cube_with_slr_empty", date1, date4));
+            result.add(buildSegment("test_kylin_cube_with_slr_empty", 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));
-            result.add(buildSegment("test_kylin_cube_with_slr_empty", date3, date4));
-            result.add(mergeSegment("test_kylin_cube_with_slr_empty", date1, date3));//don't merge all segments
+            result.add(buildSegment("test_kylin_cube_with_slr_empty", date2, date3));//empty segment
         }
         return result;
     }
@@ -267,7 +264,7 @@ public class BuildCubeWithEngineTest {
         } 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));
+            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
         }
 
@@ -283,17 +280,19 @@ public class BuildCubeWithEngineTest {
 
         SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");
         f.setTimeZone(TimeZone.getTimeZone("GMT"));
-        long dateStart = cubeManager.getCube(cubeName).getDescriptor().getModel().getPartitionDesc().getPartitionDateStart();
-        long dateEnd = f.parse("2020-11-12").getTime();
-        long dateFuture = f.parse("2021-11-12").getTime();
+        long date1 = cubeManager.getCube(cubeName).getDescriptor().getModel().getPartitionDesc().getPartitionDateStart();
+        long date2 = f.parse("2013-01-01").getTime();
+        long date3 = f.parse("2013-07-01").getTime();
+        long date4 = f.parse("2022-01-01").getTime();
 
         List<String> result = Lists.newArrayList();
         if (fastBuildMode) {
-            result.add(buildSegment(cubeName, dateStart, dateFuture));
+            result.add(buildSegment(cubeName, date1, date4));
         } else {
-            result.add(buildSegment(cubeName, dateStart, dateEnd));
-            // build an empty segment which doesn't have data
-            result.add(buildSegment(cubeName, dateEnd, dateFuture));
+            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;
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e873ba34/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerTest.java
----------------------------------------------------------------------
diff --git a/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerTest.java b/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerTest.java
index 008518e..fcfa67d 100644
--- a/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerTest.java
@@ -58,16 +58,6 @@ public class CubeManagerTest extends LocalFileMetadataTestCase {
 
     @Test
     public void testBasics() throws Exception {
-        SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");
-        f.setTimeZone(TimeZone.getTimeZone("GMT"));
-        List<String> result = Lists.newArrayList();
-        final String cubeName = "test_kylin_cube_without_slr_left_join_empty";
-
-        long date1 = CubeManager.getInstance(getTestConfig()).getCube(cubeName).getDescriptor().getModel().getPartitionDesc().getPartitionDateStart();
-        long date2 = f.parse("2012-06-01").getTime();
-        long date3 = f.parse("2022-01-01").getTime();
-        long date4 = f.parse("2023-01-01").getTime();
-
         
         
         CubeInstance cube = CubeManager.getInstance(getTestConfig()).getCube("test_kylin_cube_without_slr_ready");

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e873ba34/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json
index 8e22615..32536e1 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json
@@ -237,6 +237,6 @@
     ]
   },
   "notify_list": null,
-  "engine_type": 2,
-  "storage_type": 2
+  "engine_type": 0,
+  "storage_type": 0
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e873ba34/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
index 93d85b4..5835a41 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
@@ -15,7 +15,7 @@
     },
     {
       "id": 1,
-      "name": "CATEGORY",
+      "name": "CATEGORY"
       "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
       "column": null,
       "derived": [
@@ -289,6 +289,6 @@
     ]
   },
   "notify_list": null,
-  "engine_type": 0,
-  "storage_type": 0
+  "engine_type": 2,
+  "storage_type": 2
 }
\ No newline at end of file