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/13 10:41:45 UTC

[1/3] incubator-kylin git commit: KYLIN-1068 remove “error” from Counter as it is invisible

Repository: incubator-kylin
Updated Branches:
  refs/heads/KYLIN-1068 4d3950c14 -> 3b2a12faa


KYLIN-1068 remove “error” from Counter as it is invisible

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

Branch: refs/heads/KYLIN-1068
Commit: a1abb1124a7345dfb82be7ae35d9bb0a323e9515
Parents: 4d3950c
Author: shaofengshi <sh...@apache.org>
Authored: Tue Oct 13 16:38:01 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Tue Oct 13 16:38:01 2015 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/common/topn/Counter.java     | 13 +++++++------
 .../java/org/apache/kylin/common/topn/TopNCounter.java | 10 +++++-----
 .../apache/kylin/common/topn/TopNCounterBasicTest.java |  2 +-
 .../org/apache/kylin/common/topn/TopNCounterTest.java  |  2 +-
 4 files changed, 14 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a1abb112/core-common/src/main/java/org/apache/kylin/common/topn/Counter.java
----------------------------------------------------------------------
diff --git a/core-common/src/main/java/org/apache/kylin/common/topn/Counter.java b/core-common/src/main/java/org/apache/kylin/common/topn/Counter.java
index cde67e7..2bca4df 100644
--- a/core-common/src/main/java/org/apache/kylin/common/topn/Counter.java
+++ b/core-common/src/main/java/org/apache/kylin/common/topn/Counter.java
@@ -33,7 +33,7 @@ public class Counter<T> implements Externalizable {
 
     protected T item;
     protected double count;
-    protected double error;
+//    protected double error;
 
     /**
      * For de-serialization
@@ -43,7 +43,7 @@ public class Counter<T> implements Externalizable {
 
     public Counter(T item) {
         this.count = 0;
-        this.error = 0;
+//        this.error = 0;
         this.item = item;
     }
 
@@ -55,13 +55,14 @@ public class Counter<T> implements Externalizable {
         return count;
     }
 
-    public double getError() {
-        return error;
-    }
+//    public double getError() {
+//        return error;
+//    }
 
     @Override
     public String toString() {
-        return item + ":" + count + ':' + error;
+//        return item + ":" + count + ':' + error;
+        return item + ":" + count;
     }
 
     @SuppressWarnings("unchecked")

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a1abb112/core-common/src/main/java/org/apache/kylin/common/topn/TopNCounter.java
----------------------------------------------------------------------
diff --git a/core-common/src/main/java/org/apache/kylin/common/topn/TopNCounter.java b/core-common/src/main/java/org/apache/kylin/common/topn/TopNCounter.java
index 90967d1..6093a43 100644
--- a/core-common/src/main/java/org/apache/kylin/common/topn/TopNCounter.java
+++ b/core-common/src/main/java/org/apache/kylin/common/topn/TopNCounter.java
@@ -102,7 +102,7 @@ public class TopNCounter<T> implements ITopK<T>, Iterable<Counter<T>> {
                 droppedItem = counter.item;
                 counterMap.remove(droppedItem);
                 counter.item = item;
-                counter.error = counter.count;
+//                counter.error = counter.count;
                 counter.count = 0.0;
             }
             counterMap.put(item, counterNode);
@@ -223,21 +223,21 @@ public class TopNCounter<T> implements ITopK<T>, Iterable<Counter<T>> {
             ListNode2<Counter<T>> existing = another.counterMap.get(item);
             if (existing != null) {
                 this.offer(item, another.counterMap.get(item).getValue().count);
-                this.counterMap.get(item).getValue().error = entry.getValue().getValue().error + another.counterMap.get(item).getValue().error;
+//                entry.getValue().getValue().error += another.counterMap.get(item).getValue().error;
 
                 another.counterMap.remove(item);
             } else {
                 this.offer(item, m2);
-                this.counterMap.get(item).getValue().error = entry.getValue().getValue().error + m2;
+//                this.counterMap.get(item).getValue().error = entry.getValue().getValue().error + m2;
             }
         }
 
         for (Map.Entry<T, ListNode2<Counter<T>>> entry : another.counterMap.entrySet()) {
             T item = entry.getKey();
             double counter = entry.getValue().getValue().count;
-            double error = entry.getValue().getValue().error;
+//            double error = entry.getValue().getValue().error;
             this.offer(item, counter + m1);
-            this.counterMap.get(item).getValue().error = error + m1;
+//            this.counterMap.get(item).getValue().error = error + m1;
         }
 
         return this;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a1abb112/core-common/src/test/java/org/apache/kylin/common/topn/TopNCounterBasicTest.java
----------------------------------------------------------------------
diff --git a/core-common/src/test/java/org/apache/kylin/common/topn/TopNCounterBasicTest.java b/core-common/src/test/java/org/apache/kylin/common/topn/TopNCounterBasicTest.java
index a10851f..771df58 100644
--- a/core-common/src/test/java/org/apache/kylin/common/topn/TopNCounterBasicTest.java
+++ b/core-common/src/test/java/org/apache/kylin/common/topn/TopNCounterBasicTest.java
@@ -37,7 +37,7 @@ public class TopNCounterBasicTest {
         List<Counter<String>> topk = vs.topK(6);
 
         for (Counter<String> top : topk) {
-            System.out.println(top.getItem() + ":" + top.getCount() + ":" + top.getError());
+            System.out.println(top.getItem() + ":" + top.getCount());
         }
 
     }

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a1abb112/core-common/src/test/java/org/apache/kylin/common/topn/TopNCounterTest.java
----------------------------------------------------------------------
diff --git a/core-common/src/test/java/org/apache/kylin/common/topn/TopNCounterTest.java b/core-common/src/test/java/org/apache/kylin/common/topn/TopNCounterTest.java
index dab45b1..560f32f 100644
--- a/core-common/src/test/java/org/apache/kylin/common/topn/TopNCounterTest.java
+++ b/core-common/src/test/java/org/apache/kylin/common/topn/TopNCounterTest.java
@@ -165,7 +165,7 @@ public class TopNCounterTest {
         if (consumers.length == 1)
             return consumers;
 
-        TopNCounterTest.SpaceSavingConsumer merged = new TopNCounterTest.SpaceSavingConsumer(TOP_K * SPACE_SAVING_ROOM * PARALLEL);
+        TopNCounterTest.SpaceSavingConsumer merged = new TopNCounterTest.SpaceSavingConsumer(Integer.MAX_VALUE);
         
         for (int i=0, n=consumers.length; i<n; i++) {
             merged.vs.merge(consumers[i].vs);


[2/3] incubator-kylin git commit: KYLIN-1066 for sandbox test, limit max reducer to 5

Posted by sh...@apache.org.
KYLIN-1066 for sandbox test, limit max reducer to 5

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

Branch: refs/heads/KYLIN-1068
Commit: 5cb1ec6d78922c5e21778b1b69bb1b559f9bc12a
Parents: a1abb11
Author: shaofengshi <sh...@apache.org>
Authored: Tue Oct 13 16:39:51 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Tue Oct 13 16:39:51 2015 +0800

----------------------------------------------------------------------
 examples/test_case_data/sandbox/kylin.properties | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5cb1ec6d/examples/test_case_data/sandbox/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/kylin.properties b/examples/test_case_data/sandbox/kylin.properties
index 03df875..c13fcfb 100644
--- a/examples/test_case_data/sandbox/kylin.properties
+++ b/examples/test_case_data/sandbox/kylin.properties
@@ -33,6 +33,9 @@ kylin.job.remote.cli.working.dir=/tmp/kylin
 # Max count of concurrent jobs running
 kylin.job.concurrent.max.limit=10
 
+# Max reducer number
+kylin.job.mapreduce.max.reducer.number=5
+
 # Whether calculate cube in mem in each mapper;
 kylin.job.cubing.inMem=true
 


[3/3] incubator-kylin git commit: KYLIN-1068 give bigger random range for PRICE column on test_kylin_fact table

Posted by sh...@apache.org.
KYLIN-1068 give bigger random range for PRICE column on test_kylin_fact table

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

Branch: refs/heads/KYLIN-1068
Commit: 3b2a12faa87c056f08d1bb8ab76b52390898a7db
Parents: 5cb1ec6
Author: shaofengshi <sh...@apache.org>
Authored: Tue Oct 13 16:41:11 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Tue Oct 13 16:41:11 2015 +0800

----------------------------------------------------------------------
 examples/test_case_data/localmeta/data/data_gen_config.json | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/3b2a12fa/examples/test_case_data/localmeta/data/data_gen_config.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/data/data_gen_config.json b/examples/test_case_data/localmeta/data/data_gen_config.json
index 2da72b7..ff3f676 100644
--- a/examples/test_case_data/localmeta/data/data_gen_config.json
+++ b/examples/test_case_data/localmeta/data/data_gen_config.json
@@ -26,6 +26,14 @@
         "2000000"
       ],
       "asRange": true
+    },
+    {
+      "columnName": "PRICE",
+      "valueSet": [
+        "0",
+        "1000"
+      ],
+      "asRange": true
     }
   ]
 }