kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luke...@apache.org
Subject [31/50] [abbrv] incubator-kylin git commit: on going
Date Thu, 15 Jan 2015 12:26:47 GMT
on going


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

Branch: refs/heads/inverted-index
Commit: b4bfe412d3d68de789a3b289fa2474ffff73307c
Parents: dfd666f
Author: honma <honma@ebay.com>
Authored: Tue Jan 13 15:56:27 2015 +0800
Committer: honma <honma@ebay.com>
Committed: Wed Jan 14 18:05:45 2015 +0800

----------------------------------------------------------------------
 .../common/hll/HyperLogLogPlusCounter.java      |  3 +-
 .../com/kylinolap/common/util/BasicTest.java    | 16 ++++++++--
 .../com/kylinolap/common/util/RangeSetTest.java | 31 ++++++++++++++++++++
 .../index/CompressedValueContainer.java         |  1 +
 pom.xml                                         |  2 +-
 .../RoutingRules/RealizationPriorityRule.java   |  4 +--
 .../kylinolap/query/test/KylinQueryTest.java    |  2 ++
 .../src/test/resources/query/sql_ii/query05.sql |  2 +-
 .../src/test/resources/query/sql_ii/query08.sql |  2 +-
 .../src/test/resources/query/sql_ii/query09.sql |  2 +-
 10 files changed, 55 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/b4bfe412/common/src/main/java/com/kylinolap/common/hll/HyperLogLogPlusCounter.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/com/kylinolap/common/hll/HyperLogLogPlusCounter.java b/common/src/main/java/com/kylinolap/common/hll/HyperLogLogPlusCounter.java
index 06d2f5f..4a13622 100644
--- a/common/src/main/java/com/kylinolap/common/hll/HyperLogLogPlusCounter.java
+++ b/common/src/main/java/com/kylinolap/common/hll/HyperLogLogPlusCounter.java
@@ -20,6 +20,7 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
 import java.util.Arrays;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
@@ -74,7 +75,7 @@ public class HyperLogLogPlusCounter implements Comparable<HyperLogLogPlusCounter
     }
 
     public void add(String value) {
-        add(hashFunc.hashString(value).asLong());
+        add(hashFunc.hashString(value,Charset.defaultCharset()).asLong());
     }
 
     public void add(byte[] value) {

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/b4bfe412/common/src/test/java/com/kylinolap/common/util/BasicTest.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/com/kylinolap/common/util/BasicTest.java b/common/src/test/java/com/kylinolap/common/util/BasicTest.java
index c3bc477..eb6f59f 100644
--- a/common/src/test/java/com/kylinolap/common/util/BasicTest.java
+++ b/common/src/test/java/com/kylinolap/common/util/BasicTest.java
@@ -2,7 +2,12 @@ package com.kylinolap.common.util;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
 
+import com.google.common.collect.DiscreteDomain;
+import com.google.common.collect.Range;
+import com.google.common.collect.RangeSet;
+import com.google.common.collect.TreeRangeSet;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.*;
@@ -34,14 +39,19 @@ public class BasicTest {
     @Test
     @Ignore("convenient trial tool for dev")
     public void test1() throws IOException, InterruptedException {
-        log.info("xxx {} yyy {}",100,290);
 
+        RangeSet<Integer> rangeSet = TreeRangeSet.create();
+        Range a = Range.closed(1, 10);
+        Range b = Range.closedOpen(11, 15);
+        Range newa = a.canonical(DiscreteDomain.integers());
+        Range newb = b.canonical(DiscreteDomain.integers());
+        rangeSet.add(newa);
+        rangeSet.add(newb);
+        System.out.println(rangeSet);
     }
 
     @Test
     @Ignore("fix it later")
     public void test2() throws IOException {
-
     }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/b4bfe412/common/src/test/java/com/kylinolap/common/util/RangeSetTest.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/com/kylinolap/common/util/RangeSetTest.java b/common/src/test/java/com/kylinolap/common/util/RangeSetTest.java
new file mode 100644
index 0000000..6ca8974
--- /dev/null
+++ b/common/src/test/java/com/kylinolap/common/util/RangeSetTest.java
@@ -0,0 +1,31 @@
+package com.kylinolap.common.util;
+
+import com.google.common.collect.*;
+import org.junit.Test;
+
+import java.io.IOException;
+
+/**
+ * Created by Hongbin Ma(Binmahone) on 1/13/15.
+ */
+public class RangeSetTest {
+    @Test
+    public void test1() throws IOException, InterruptedException {
+        RangeSet<Integer> rangeSet = TreeRangeSet.create();
+        Range a = Range.closedOpen(1, 2);
+        Range b = Range.closedOpen(2, 3);
+        Range newa = a.canonical(DiscreteDomain.integers());
+        Range newb = b.canonical(DiscreteDomain.integers());
+        rangeSet.add(newa);
+        rangeSet.add(newb);
+        System.out.println(rangeSet);
+
+        for (Range r : rangeSet.asRanges()) {
+            ContiguousSet<Integer> s = ContiguousSet.create(r, DiscreteDomain.integers());
+            for (Integer x : s) {
+                System.out.println(x);
+            }
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/b4bfe412/invertedindex/src/main/java/com/kylinolap/invertedindex/index/CompressedValueContainer.java
----------------------------------------------------------------------
diff --git a/invertedindex/src/main/java/com/kylinolap/invertedindex/index/CompressedValueContainer.java
b/invertedindex/src/main/java/com/kylinolap/invertedindex/index/CompressedValueContainer.java
index e7f7eab..31e96fd 100644
--- a/invertedindex/src/main/java/com/kylinolap/invertedindex/index/CompressedValueContainer.java
+++ b/invertedindex/src/main/java/com/kylinolap/invertedindex/index/CompressedValueContainer.java
@@ -56,6 +56,7 @@ public class CompressedValueContainer implements ColumnValueContainer {
 		size++;
 	}
 
+
 	@Override
 	public void getValueAt(int i, ImmutableBytesWritable valueBytes) {
 		valueBytes.set(uncompressed, valueLen * i, valueLen);

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/b4bfe412/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 67d24f5..cd72da1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,7 +44,7 @@
         <log4j.version>1.2.17</log4j.version>
         <slf4j.version>1.6.4</slf4j.version>
         <jackson.version>2.2.3</jackson.version>
-        <guava.version>12.0.1</guava.version>
+        <guava.version>18.0</guava.version>
         <jsch.version>0.1.51</jsch.version>
         <xerces.version>2.9.1</xerces.version>
         <xalan.version>2.7.1</xalan.version>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/b4bfe412/query/src/main/java/com/kylinolap/query/routing/RoutingRules/RealizationPriorityRule.java
----------------------------------------------------------------------
diff --git a/query/src/main/java/com/kylinolap/query/routing/RoutingRules/RealizationPriorityRule.java
b/query/src/main/java/com/kylinolap/query/routing/RoutingRules/RealizationPriorityRule.java
index 37758d2..1fcbb36 100644
--- a/query/src/main/java/com/kylinolap/query/routing/RoutingRules/RealizationPriorityRule.java
+++ b/query/src/main/java/com/kylinolap/query/routing/RoutingRules/RealizationPriorityRule.java
@@ -18,8 +18,8 @@ public class RealizationPriorityRule extends RoutingRule {
     public void apply(List<IRealization> realizations, OLAPContext olapContext) {
 
         final HashMap<RealizationType, Integer> priority = Maps.newHashMap();
-        priority.put(RealizationType.CUBE, 0);
-        priority.put(RealizationType.INVERTED_INDEX, 1);
+        priority.put(RealizationType.CUBE, 1);
+        priority.put(RealizationType.INVERTED_INDEX, 0);
 
         Collections.sort(realizations, new Comparator<IRealization>() {
             @Override

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/b4bfe412/query/src/test/java/com/kylinolap/query/test/KylinQueryTest.java
----------------------------------------------------------------------
diff --git a/query/src/test/java/com/kylinolap/query/test/KylinQueryTest.java b/query/src/test/java/com/kylinolap/query/test/KylinQueryTest.java
index f6eb96c..ec88d16 100644
--- a/query/src/test/java/com/kylinolap/query/test/KylinQueryTest.java
+++ b/query/src/test/java/com/kylinolap/query/test/KylinQueryTest.java
@@ -166,6 +166,8 @@ public class KylinQueryTest extends KylinTestBase {
     @Test
     @Ignore("ii not ready")
     public void testIIQuery() throws Exception {
+
+
         execAndCompQuery("src/test/resources/query/sql_ii", null, true);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/b4bfe412/query/src/test/resources/query/sql_ii/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query05.sql b/query/src/test/resources/query/sql_ii/query05.sql
index 763dd06..683c978 100644
--- a/query/src/test/resources/query/sql_ii/query05.sql
+++ b/query/src/test/resources/query/sql_ii/query05.sql
@@ -1 +1 @@
-select sum(price) as price_sum, min(price) as price_min , max(price) as price_max , SELLER_ID
from test_kylin_fact   where SELLER_ID > 10000570 group by SELLER_ID
\ No newline at end of file
+select sum(price) as price_sum, min(price) as price_min , max(price) as price_max , SELLER_ID
from test_kylin_fact   where SELLER_ID > 10000149 group by SELLER_ID
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/b4bfe412/query/src/test/resources/query/sql_ii/query08.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query08.sql b/query/src/test/resources/query/sql_ii/query08.sql
index 49a872d..e331352 100644
--- a/query/src/test/resources/query/sql_ii/query08.sql
+++ b/query/src/test/resources/query/sql_ii/query08.sql
@@ -1 +1 @@
-select TRANS_ID,CAL_DT,LSTG_FORMAT_NAME,LEAF_CATEG_ID,LSTG_SITE_ID,SLR_SEGMENT_CD,PRICE,ITEM_COUNT,SELLER_ID
from test_kylin_fact where LSTG_FORMAT_NAME < 'ABIN'
\ No newline at end of file
+select TRANS_ID,CAL_DT,LSTG_FORMAT_NAME,LEAF_CATEG_ID,LSTG_SITE_ID,SLR_SEGMENT_CD,PRICE,ITEM_COUNT,SELLER_ID
from test_kylin_fact where LSTG_FORMAT_NAME > 'ABIN'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/b4bfe412/query/src/test/resources/query/sql_ii/query09.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query09.sql b/query/src/test/resources/query/sql_ii/query09.sql
index e621991..f932a22 100644
--- a/query/src/test/resources/query/sql_ii/query09.sql
+++ b/query/src/test/resources/query/sql_ii/query09.sql
@@ -1 +1 @@
-select price, SELLER_ID from test_kylin_fact   where SELLER_ID > 10000570
\ No newline at end of file
+select price, SELLER_ID from test_kylin_fact   where SELLER_ID > 10000149
\ No newline at end of file


Mime
View raw message