Repository: kylin Updated Branches: refs/heads/master 89fb4870c -> 41014d6a5
stop testing storage type 0 as it is no longer used Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/41014d6a Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/41014d6a Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/41014d6a Branch: refs/heads/master Commit: 41014d6a5cc8d071738be97a97d28bf2c90e8621 Parents: 89fb487 Author: Hongbin Ma <mahong...@apache.org> Authored: Mon Apr 18 13:56:35 2016 +0800 Committer: Hongbin Ma <mahong...@apache.org> Committed: Mon Apr 18 13:56:40 2016 +0800 ---------------------------------------------------------------------- .../java/org/apache/kylin/cube/common/RowKeySplitterTest.java | 6 +++--- .../test/java/org/apache/kylin/cube/kv/RowKeyDecoderTest.java | 2 +- .../test/java/org/apache/kylin/cube/kv/RowKeyEncoderTest.java | 3 +-- .../cube_desc/test_kylin_cube_with_slr_left_join_desc.json | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/41014d6a/core-cube/src/test/java/org/apache/kylin/cube/common/RowKeySplitterTest.java ---------------------------------------------------------------------- diff --git a/core-cube/src/test/java/org/apache/kylin/cube/common/RowKeySplitterTest.java b/core-cube/src/test/java/org/apache/kylin/cube/common/RowKeySplitterTest.java index 1ddc745..b41f23b 100644 --- a/core-cube/src/test/java/org/apache/kylin/cube/common/RowKeySplitterTest.java +++ b/core-cube/src/test/java/org/apache/kylin/cube/common/RowKeySplitterTest.java @@ -48,7 +48,7 @@ public class RowKeySplitterTest extends LocalFileMetadataTestCase { RowKeySplitter rowKeySplitter = new RowKeySplitter(cube.getFirstSegment(), 11, 20); // base cuboid rowkey - byte[] input = { 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0,-104,-106,-128, 11, 54, -105, 55,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 13, 71, 114, 65, 66, 73, 78, 9, 9, 9, 9, 9, 9, 9, 9, 0, 10, 0 }; + byte[] input = { 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, -104, -106, -128, 11, 54, -105, 55, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 13, 71, 114, 65, 66, 73, 78, 9, 9, 9, 9, 9, 9, 9, 9, 0, 10, 0 }; rowKeySplitter.split(input); assertEquals(11, rowKeySplitter.getBufferSize()); @@ -61,9 +61,9 @@ public class RowKeySplitterTest extends LocalFileMetadataTestCase { RowKeySplitter rowKeySplitter = new RowKeySplitter(cube.getFirstSegment(), 11, 20); // base cuboid rowkey - byte[] input = { 0, 0, 0, 0, 0, 0, 0, -1, 11, 55, -13, 13, 22, 34, 121, 70, 80, 45, 71, 84, 67, 9, 9, 9, 9, 9, 9, 0, 10, 5 }; + byte[] input = { 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 11, 55, -13, 13, 22, 34, 121, 70, 80, 45, 71, 84, 67, 9, 9, 9, 9, 9, 9, 0, 10, 5 }; rowKeySplitter.split(input); - assertEquals(9, rowKeySplitter.getBufferSize()); + assertEquals(10, rowKeySplitter.getBufferSize()); } } http://git-wip-us.apache.org/repos/asf/kylin/blob/41014d6a/core-cube/src/test/java/org/apache/kylin/cube/kv/RowKeyDecoderTest.java ---------------------------------------------------------------------- diff --git a/core-cube/src/test/java/org/apache/kylin/cube/kv/RowKeyDecoderTest.java b/core-cube/src/test/java/org/apache/kylin/cube/kv/RowKeyDecoderTest.java index 0fe37f7..43498d3 100644 --- a/core-cube/src/test/java/org/apache/kylin/cube/kv/RowKeyDecoderTest.java +++ b/core-cube/src/test/java/org/apache/kylin/cube/kv/RowKeyDecoderTest.java @@ -53,7 +53,7 @@ public class RowKeyDecoderTest extends LocalFileMetadataTestCase { RowKeyDecoder rowKeyDecoder = new RowKeyDecoder(cube.getFirstSegment()); - byte[] key = { 0, 0, 0, 0, 0, 0, 0, -1, 11, 55, -13, 13, 22, 34, 121, 70, 80, 45, 71, 84, 67, 9, 9, 9, 9, 9, 9, 0, 10, 5 }; + byte[] key = { 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 11, 55, -13, 13, 22, 34, 121, 70, 80, 45, 71, 84, 67, 9, 9, 9, 9, 9, 9, 0, 10, 5 }; rowKeyDecoder.decode(key); List<String> values = rowKeyDecoder.getValues(); http://git-wip-us.apache.org/repos/asf/kylin/blob/41014d6a/core-cube/src/test/java/org/apache/kylin/cube/kv/RowKeyEncoderTest.java ---------------------------------------------------------------------- diff --git a/core-cube/src/test/java/org/apache/kylin/cube/kv/RowKeyEncoderTest.java b/core-cube/src/test/java/org/apache/kylin/cube/kv/RowKeyEncoderTest.java index 1a6b4dd..ba71387 100644 --- a/core-cube/src/test/java/org/apache/kylin/cube/kv/RowKeyEncoderTest.java +++ b/core-cube/src/test/java/org/apache/kylin/cube/kv/RowKeyEncoderTest.java @@ -70,13 +70,12 @@ public class RowKeyEncoderTest extends LocalFileMetadataTestCase { byte[] encodedKey = rowKeyEncoder.encode(data); assertEquals(22 + rowKeyEncoder.getHeaderLength(), encodedKey.length); - byte[] cuboidId = Arrays.copyOfRange(encodedKey, 0, rowKeyEncoder.getHeaderLength()); + byte[] cuboidId = Arrays.copyOfRange(encodedKey, RowConstants.ROWKEY_SHARDID_LEN, rowKeyEncoder.getHeaderLength()); byte[] rest = Arrays.copyOfRange(encodedKey, rowKeyEncoder.getHeaderLength(), encodedKey.length); assertEquals(255, Bytes.toLong(cuboidId)); assertArrayEquals(new byte[] { 11, 55, -13, 13, 22, 34, 121, 70, 80, 45, 71, 84, 67, 9, 9, 9, 9, 9, 9, 0, 10, 5 }, rest); } - @Test public void testEncodeWithSlr() throws Exception { CubeInstance cube = CubeManager.getInstance(getTestConfig()).getCube("TEST_KYLIN_CUBE_WITH_SLR_READY"); http://git-wip-us.apache.org/repos/asf/kylin/blob/41014d6a/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 9d82ac3..33a7080 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 @@ -165,7 +165,7 @@ "status_need_notify" : [ ], "auto_merge_time_ranges" : null, "retention_range" : 0, - "engine_type" : 0, + "engine_type" : 2, "storage_type" : 2, "partition_date_start" : 0 } \ No newline at end of file