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/11/19 07:11:16 UTC

[1/3] incubator-kylin git commit: KYLIN-1112 Remove ITopK.java

Repository: incubator-kylin
Updated Branches:
  refs/heads/2.x-staging d5a676ab6 -> 6c4148ec7


KYLIN-1112 Remove ITopK.java


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

Branch: refs/heads/2.x-staging
Commit: 6c4148ec7eec47d4c612e1703b0c8fc8fc305842
Parents: 60f9da0
Author: shaofengshi <sh...@apache.org>
Authored: Thu Nov 19 14:10:40 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Thu Nov 19 14:11:05 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/common/topn/ITopK.java     | 53 --------------------
 .../apache/kylin/common/topn/TopNCounter.java   |  5 +-
 2 files changed, 1 insertion(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/6c4148ec/core-common/src/main/java/org/apache/kylin/common/topn/ITopK.java
----------------------------------------------------------------------
diff --git a/core-common/src/main/java/org/apache/kylin/common/topn/ITopK.java b/core-common/src/main/java/org/apache/kylin/common/topn/ITopK.java
deleted file mode 100644
index 36603b7..0000000
--- a/core-common/src/main/java/org/apache/kylin/common/topn/ITopK.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package org.apache.kylin.common.topn;
-
-import java.util.List;
-
-/**
- * Modified from https://github.com/addthis/stream-lib
- *  
- * @param <T>
- */
-public interface ITopK<T> {
-
-    /**
-     * offer a single element to the top.
-     *
-     * @param element - the element to add to the top
-     * @return false if the element was already in the top
-     */
-    boolean offer(T element);
-
-    /**
-     * offer a single element to the top and increment the count
-     * for that element by incrementCount.
-     *
-     * @param element        - the element to add to the top
-     * @param incrementCount - the increment count for the given count
-     * @return false if the element was already in the top
-     */
-    boolean offer(T element, double incrementCount);
-
-    /**
-     * @param k
-     * @return top k elements offered (may be an approximation)
-     */
-    List<T> peek(int k);
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/6c4148ec/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 e6c5c90..9536ef7 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
@@ -34,7 +34,7 @@ import java.util.*;
  *
  * @param <T> type of data in the stream to be summarized
  */
-public class TopNCounter<T> implements ITopK<T>, Iterable<Counter<T>> {
+public class TopNCounter<T> implements Iterable<Counter<T>> {
 
     public static final int EXTRA_SPACE_RATE = 50;
 
@@ -61,7 +61,6 @@ public class TopNCounter<T> implements ITopK<T>, Iterable<Counter<T>> {
      * @param item stream element (<i>e</i>)
      * @return false if item was already in the stream summary, true otherwise
      */
-    @Override
     public boolean offer(T item) {
         return offer(item, 1.0);
     }
@@ -72,7 +71,6 @@ public class TopNCounter<T> implements ITopK<T>, Iterable<Counter<T>> {
      * @param item stream element (<i>e</i>)
      * @return false if item was already in the stream summary, true otherwise
      */
-    @Override
     public boolean offer(T item, double incrementCount) {
         return offerReturnAll(item, incrementCount).getFirst();
     }
@@ -153,7 +151,6 @@ public class TopNCounter<T> implements ITopK<T>, Iterable<Counter<T>> {
 
     }
 
-    @Override
     public List<T> peek(int k) {
         List<T> topK = new ArrayList<T>(k);
 


[3/3] incubator-kylin git commit: update bin/metastore.sh to use bin/kylin.sh

Posted by sh...@apache.org.
update bin/metastore.sh to use bin/kylin.sh


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

Branch: refs/heads/2.x-staging
Commit: 812fec043ebbba0b7ea6af0fe94cc50159eb62a8
Parents: d5a676a
Author: shaofengshi <sh...@apache.org>
Authored: Mon Nov 16 16:46:37 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Thu Nov 19 14:11:05 2015 +0800

----------------------------------------------------------------------
 build/bin/metastore.sh | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/812fec04/build/bin/metastore.sh
----------------------------------------------------------------------
diff --git a/build/bin/metastore.sh b/build/bin/metastore.sh
index de0b081..39593d4 100755
--- a/build/bin/metastore.sh
+++ b/build/bin/metastore.sh
@@ -28,9 +28,6 @@
 dir=$(dirname ${0})
 source ${dir}/check-env.sh
 
-_jobjar=`ls ${KYLIN_HOME}/lib |grep kylin-job`
-_fulljobjar="${KYLIN_HOME}/lib/${_jobjar}"
-
 if [ $1 == "backup" ]
 then
 
@@ -41,7 +38,7 @@ then
     echo "Starting backup to ${_file}"
     mkdir -p ${_file}
 
-    hbase  org.apache.hadoop.util.RunJar ${_fulljobjar}   org.apache.kylin.common.persistence.ResourceTool download ${_file}
+    ${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.common.persistence.ResourceTool download ${_file}
     echo "metadata store backed up to ${_file}"
 
 elif [ $1 == "restore" ]
@@ -49,17 +46,17 @@ then
 
     _file=$2
     echo "Starting restoring $_file"
-    hbase  org.apache.hadoop.util.RunJar  ${_fulljobjar}   org.apache.kylin.common.persistence.ResourceTool upload $_file
+    ${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.common.persistence.ResourceTool upload $_file
 
 elif [ $1 == "reset" ]
 then
 
-    hbase  org.apache.hadoop.util.RunJar ${_fulljobjar}   org.apache.kylin.common.persistence.ResourceTool  reset
+    ${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.common.persistence.ResourceTool  reset
     
 elif [ $1 == "clean" ]
 then
 
-    hbase  org.apache.hadoop.util.RunJar ${_fulljobjar}   org.apache.kylin.engine.mr.steps.MetadataCleanupJob "${@:2}"
+    ${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.job.hadoop.cube.MetadataCleanupJob "${@:2}"
 
 else
     echo "usage: metastore.sh backup"


[2/3] incubator-kylin git commit: Add “addthis/stream-lib” into LICENSE

Posted by sh...@apache.org.
Add “addthis/stream-lib” into LICENSE


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

Branch: refs/heads/2.x-staging
Commit: 60f9da05b4c844a349a1044e1c6dba9f0e5c3d51
Parents: 812fec0
Author: shaofengshi <sh...@apache.org>
Authored: Mon Nov 16 17:03:33 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Thu Nov 19 14:11:05 2015 +0800

----------------------------------------------------------------------
 LICENSE | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/60f9da05/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 4bfafaa..92e09a4 100644
--- a/LICENSE
+++ b/LICENSE
@@ -227,3 +227,11 @@ For english-words.80 (scowl-2015.05.18).txt:
 This product bundles SCOWL, which is available under a
 MIT-like license.  For details, see
 https://raw.githubusercontent.com/kevina/wordlist/master/scowl/Copyright
+
+
+==============================================================================
+For addthis/stream-lib:
+==============================================================================
+This product copies some Top-K code from addthis/stream-lib, which is under
+Apache License Version 2. For details, see
+https://github.com/addthis/stream-lib/blob/master/LICENSE.txt
\ No newline at end of file