kylin git commit: remove mvn-adamgent repository from server pom
Repository: kylin Updated Branches: refs/heads/1.5.x-HBase1.1.3 dffbbf3bb -> 9125d148e remove mvn-adamgent repository from server pom Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/9125d148 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/9125d148 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/9125d148 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 9125d148e87fd7ee701355607a127db4521cc52c Parents: dffbbf3 Author: shaofengshiAuthored: Thu Mar 24 10:42:59 2016 +0800 Committer: shaofengshi Committed: Thu Mar 24 10:42:59 2016 +0800 -- server/pom.xml | 5 - 1 file changed, 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/9125d148/server/pom.xml -- diff --git a/server/pom.xml b/server/pom.xml index 5442f7f..b990921 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -495,11 +495,6 @@ true - -mvn-adamgent -http://mvn-adamgent.googlecode.com/svn/maven/release -Adam Gent Maven Repository -
kylin git commit: KYLIN-1524 Top-N metris data type is BigInt
Repository: kylin Updated Branches: refs/heads/master 9b9cfe8f7 -> 6d61055ff KYLIN-1524 Top-N metris data type is BigInt Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/6d61055f Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/6d61055f Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/6d61055f Branch: refs/heads/master Commit: 6d61055ffeb38f77c58e203dceeec58560550742 Parents: 9b9cfe8 Author: shaofengshiAuthored: Wed Mar 23 19:53:13 2016 +0800 Committer: shaofengshi Committed: Wed Mar 23 19:53:13 2016 +0800 -- .../java/org/apache/kylin/measure/topn/TopNMeasureType.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/6d61055f/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java -- diff --git a/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java b/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java index 2167cc1..cee8603 100644 --- a/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java +++ b/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java @@ -267,7 +267,8 @@ public class TopNMeasureType extends MeasureType { final int literalTupleIdx = tupleInfo.hasColumn(literalCol) ? tupleInfo.getColumnIndex(literalCol) : -1; // for TopN, the aggr must be SUM, so the number fill into the column position (without rewrite) final int numericTupleIdx = tupleInfo.hasColumn(numericCol) ? tupleInfo.getColumnIndex(numericCol) : -1; - +final DataType numericField = DataType.getType(tupleInfo.getDataTypeName(numericTupleIdx)); +final boolean isIntFamily = numericField.isIntegerFamily(); return new IAdvMeasureFiller() { private TopNCounter topNCounter; private Iterator topNCounterIterator; @@ -295,7 +296,7 @@ public class TopNMeasureType extends MeasureType { int key = BytesUtil.readUnsigned(counter.getItem().array(), counter.getItem().offset(), counter.getItem().length()); String colValue = topNColDict.getValueFromId(key); tuple.setDimensionValue(literalTupleIdx, colValue); -tuple.setMeasureValue(numericTupleIdx, counter.getCount()); +tuple.setMeasureValue(numericTupleIdx, isIntFamily ? (long) counter.getCount() : counter.getCount()); } }; }
[45/50] [abbrv] kylin git commit: minor, fix dev-support script
minor, fix dev-support script Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/4aeb76b5 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/4aeb76b5 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/4aeb76b5 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 4aeb76b5613caba382a0d855bcb19fdb36ce7122 Parents: bccdd4f Author: Yang LiAuthored: Sat Mar 12 09:07:06 2016 +0800 Committer: Yang Li Committed: Sat Mar 12 09:07:06 2016 +0800 -- dev-support/test_all_against_hdp_2_2_4_2_2.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/4aeb76b5/dev-support/test_all_against_hdp_2_2_4_2_2.sh -- diff --git a/dev-support/test_all_against_hdp_2_2_4_2_2.sh b/dev-support/test_all_against_hdp_2_2_4_2_2.sh index 0f81d2e..f0d27e4 100644 --- a/dev-support/test_all_against_hdp_2_2_4_2_2.sh +++ b/dev-support/test_all_against_hdp_2_2_4_2_2.sh @@ -21,5 +21,5 @@ dir=$(dirname ${0}) cd ${dir} cd .. -mvn clean install -DskipTests | tee mci.log -mvn verify -Dhdp.version=2.2.4.2-2 -fae | tee mvnverify.log +mvn clean install -DskipTests 2>&1 | tee mci.log +mvn verify -Dhdp.version=2.2.4.2-2 -fae 2>&1 | tee mvnverify.log
[19/50] [abbrv] kylin git commit: KYLIN-1343 Upgrade to calcite 1.6 (with Edward Zhang)
http://git-wip-us.apache.org/repos/asf/kylin/blob/f73abf6c/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MergeCuboidJobTest.java -- diff --git a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MergeCuboidJobTest.java b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MergeCuboidJobTest.java index 7e530db..97b1ef2 100644 --- a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MergeCuboidJobTest.java +++ b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MergeCuboidJobTest.java @@ -44,7 +44,6 @@ public class MergeCuboidJobTest extends LocalFileMetadataTestCase { conf.set("fs.default.name", "file:///"); conf.set("mapreduce.framework.name", "local"); conf.set("mapreduce.application.framework.path", ""); - // for local runner out-of-memory issue conf.set("mapreduce.task.io.sort.mb", "10"); http://git-wip-us.apache.org/repos/asf/kylin/blob/f73abf6c/jdbc/src/main/java/org/apache/kylin/jdbc/KylinConnection.java -- diff --git a/jdbc/src/main/java/org/apache/kylin/jdbc/KylinConnection.java b/jdbc/src/main/java/org/apache/kylin/jdbc/KylinConnection.java index 86c8d1d..6852998 100644 --- a/jdbc/src/main/java/org/apache/kylin/jdbc/KylinConnection.java +++ b/jdbc/src/main/java/org/apache/kylin/jdbc/KylinConnection.java @@ -118,7 +118,7 @@ public class KylinConnection extends AvaticaConnection { ArrayList columns = new ArrayList(); MapinternalParams = Collections. emptyMap(); -return new Meta.Signature(columns, sql, params, internalParams, CursorFactory.ARRAY); +return new Meta.Signature(columns, sql, params, internalParams, CursorFactory.ARRAY, Meta.StatementType.SELECT); } private KylinJdbcFactory factory() { http://git-wip-us.apache.org/repos/asf/kylin/blob/f73abf6c/jdbc/src/main/java/org/apache/kylin/jdbc/KylinJdbcFactory.java -- diff --git a/jdbc/src/main/java/org/apache/kylin/jdbc/KylinJdbcFactory.java b/jdbc/src/main/java/org/apache/kylin/jdbc/KylinJdbcFactory.java index f1a4939..6aae983 100644 --- a/jdbc/src/main/java/org/apache/kylin/jdbc/KylinJdbcFactory.java +++ b/jdbc/src/main/java/org/apache/kylin/jdbc/KylinJdbcFactory.java @@ -33,6 +33,7 @@ import org.apache.calcite.avatica.AvaticaStatement; import org.apache.calcite.avatica.Meta.Frame; import org.apache.calcite.avatica.Meta.Signature; import org.apache.calcite.avatica.Meta.StatementHandle; +import org.apache.calcite.avatica.QueryState; import org.apache.calcite.avatica.UnregisteredDriver; /** @@ -93,9 +94,9 @@ public class KylinJdbcFactory implements AvaticaFactory { } @Override -public AvaticaResultSet newResultSet(AvaticaStatement statement, Signature signature, TimeZone timeZone, Frame firstFrame) throws SQLException { +public AvaticaResultSet newResultSet(AvaticaStatement statement, QueryState state, Signature signature, TimeZone timeZone, Frame firstFrame) throws SQLException { AvaticaResultSetMetaData resultSetMetaData = new AvaticaResultSetMetaData(statement, null, signature); -return new KylinResultSet(statement, signature, resultSetMetaData, timeZone, firstFrame); +return new KylinResultSet(statement, state, signature, resultSetMetaData, timeZone, firstFrame); } @Override http://git-wip-us.apache.org/repos/asf/kylin/blob/f73abf6c/jdbc/src/main/java/org/apache/kylin/jdbc/KylinMeta.java -- diff --git a/jdbc/src/main/java/org/apache/kylin/jdbc/KylinMeta.java b/jdbc/src/main/java/org/apache/kylin/jdbc/KylinMeta.java index cae39ad..05f7983 100644 --- a/jdbc/src/main/java/org/apache/kylin/jdbc/KylinMeta.java +++ b/jdbc/src/main/java/org/apache/kylin/jdbc/KylinMeta.java @@ -30,6 +30,10 @@ import java.util.regex.Pattern; import org.apache.calcite.avatica.AvaticaUtils; import org.apache.calcite.avatica.ColumnMetaData; import org.apache.calcite.avatica.MetaImpl; +import org.apache.calcite.avatica.MissingResultsException; +import org.apache.calcite.avatica.NoSuchStatementException; +import org.apache.calcite.avatica.QueryState; +import org.apache.calcite.avatica.remote.TypedValue; import com.google.common.collect.ImmutableList; @@ -55,6 +59,13 @@ public class KylinMeta extends MetaImpl { result.signature = connection().mockPreparedSignature(sql); return result; } + +// real execution happens in KylinResultSet.execute() +@Override +public ExecuteResult execute(StatementHandle sh, List parameterValues, long maxRowCount) throws NoSuchStatementException { +final MetaResultSet metaResultSet = MetaResultSet.create(sh.connectionId, sh.id, false, sh.signature, null); +return
[16/50] [abbrv] kylin git commit: KYLIN-1417 Change to use TreeMap to allow null as value
KYLIN-1417 Change to use TreeMap to allow null as value Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/d1a574b8 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/d1a574b8 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/d1a574b8 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: d1a574b80ef35ebdae69718998a2dfcaeafc3cbc Parents: 50aab0b Author: shaofengshiAuthored: Tue Feb 16 10:29:47 2016 +0800 Committer: shaofengshi Committed: Tue Mar 8 12:21:40 2016 +0800 -- .../apache/kylin/source/kafka/TimedJsonStreamParser.java | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/d1a574b8/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java -- diff --git a/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java b/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java index 0907623..e3075d5 100644 --- a/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java +++ b/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java @@ -35,11 +35,7 @@ package org.apache.kylin.source.kafka; import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import kafka.message.MessageAndOffset; @@ -102,7 +98,9 @@ public final class TimedJsonStreamParser extends StreamingParser { @Override public StreamingMessage parse(MessageAndOffset messageAndOffset) { try { -Map root = mapper.readValue(new ByteBufferBackedInputStream(messageAndOffset.message().payload()), mapType); +Map message = mapper.readValue(new ByteBufferBackedInputStream(messageAndOffset.message().payload()), mapType); +Map root = new TreeMap (String.CASE_INSENSITIVE_ORDER); +root.putAll(message); String tsStr = root.get(tsColName); //Preconditions.checkArgument(!StringUtils.isEmpty(tsStr), "Timestamp field " + tsColName + // //" cannot be null, the message offset is " + messageAndOffset.getOffset() + " content is " + new String(messageAndOffset.getRawData()));
[21/50] [abbrv] kylin git commit: KYLIN-1343 Upgrade to calcite 1.6 (with Edward Zhang)
KYLIN-1343 Upgrade to calcite 1.6 (with Edward Zhang) Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/f73abf6c Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/f73abf6c Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/f73abf6c Branch: refs/heads/1.5.x-HBase1.1.3 Commit: f73abf6c2df97c1c89e7e6edf3865d82350f8472 Parents: 9021f17 Author: Yang LiAuthored: Sun Mar 6 00:06:05 2016 +0800 Committer: Li Yang Committed: Tue Mar 8 15:54:05 2016 +0800 -- .../adapter/enumerable/EnumerableJoin.java | 145 - .../apache/calcite/runtime/SqlFunctions.java| 1317 --- .../apache/calcite/sql2rel/RelFieldTrimmer.java | 44 + .../calcite/sql2rel/SqlToRelConverter.java | 8150 ++ .../engine/mr/steps/MergeCuboidJobTest.java |1 - .../org/apache/kylin/jdbc/KylinConnection.java |2 +- .../org/apache/kylin/jdbc/KylinJdbcFactory.java |5 +- .../java/org/apache/kylin/jdbc/KylinMeta.java | 46 +- .../kylin/jdbc/KylinPreparedStatement.java |2 + .../org/apache/kylin/jdbc/KylinResultSet.java |5 +- kylin-it/src/test/resources/logging.properties |2 +- .../src/test/resources/query/sql/query92.sql| 30 + .../resources/query/sql/query92.sql.disabled| 30 - .../src/test/resources/query/sql/query93.sql| 30 + .../resources/query/sql/query93.sql.disabled| 30 - .../src/test/resources/query/sql/query94.sql| 30 + .../resources/query/sql/query94.sql.disabled| 30 - .../src/test/resources/query/sql/query95.sql| 30 + .../resources/query/sql/query95.sql.disabled| 30 - pom.xml |2 +- .../kylin/query/optrule/OLAPJoinRule.java |2 +- .../kylin/query/relnode/OLAPAggregateRel.java | 10 +- .../kylin/query/relnode/OLAPFilterRel.java |5 +- .../apache/kylin/query/relnode/OLAPJoinRel.java | 22 +- .../kylin/query/relnode/OLAPLimitRel.java |5 +- .../kylin/query/relnode/OLAPProjectRel.java |5 +- .../apache/kylin/query/relnode/OLAPSortRel.java |5 +- .../kylin/query/relnode/OLAPTableScan.java |9 +- .../relnode/OLAPToEnumerableConverter.java |6 +- .../apache/kylin/query/schema/OLAPTable.java| 17 +- 30 files changed, 4836 insertions(+), 5211 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/f73abf6c/atopcalcite/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableJoin.java -- diff --git a/atopcalcite/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableJoin.java b/atopcalcite/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableJoin.java deleted file mode 100644 index a3c04f8..000 --- a/atopcalcite/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableJoin.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * OVERRIDE POINT: - * - constructor was private instead of protected - */ - -/* - * 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.calcite.adapter.enumerable; - -import java.util.Set; - -import org.apache.calcite.linq4j.tree.BlockBuilder; -import org.apache.calcite.linq4j.tree.Expression; -import org.apache.calcite.linq4j.tree.Expressions; -import org.apache.calcite.plan.RelOptCluster; -import org.apache.calcite.plan.RelOptCost; -import org.apache.calcite.plan.RelOptPlanner; -import org.apache.calcite.plan.RelTraitSet; -import org.apache.calcite.rel.InvalidRelException; -import org.apache.calcite.rel.RelNode; -import org.apache.calcite.rel.RelNodes; -import org.apache.calcite.rel.core.EquiJoin; -import org.apache.calcite.rel.core.JoinInfo; -import org.apache.calcite.rel.core.JoinRelType; -import org.apache.calcite.rel.metadata.RelMetadataQuery; -import org.apache.calcite.rex.RexNode; -import org.apache.calcite.util.BuiltInMethod; -import org.apache.calcite.util.ImmutableIntList; -import org.apache.calcite.util.Util; - -import com.google.common.collect.ImmutableList; - -/**
[24/50] [abbrv] kylin git commit: KYLIN-1483 Command tool to visualize all cuboids in a cube/segment
KYLIN-1483 Command tool to visualize all cuboids in a cube/segment Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/c4be5461 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/c4be5461 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/c4be5461 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: c4be5461f070b073c12388d0ad9d8d9d3b7519f0 Parents: ed57c3b Author: Hongbin MaAuthored: Thu Mar 10 14:21:57 2016 +0800 Committer: Hongbin Ma Committed: Thu Mar 10 14:21:57 2016 +0800 -- .../org/apache/kylin/cube/cuboid/Cuboid.java| 39 +++- .../kylin/engine/mr/common/CubeStatsReader.java | 7 ++-- 2 files changed, 25 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/c4be5461/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java -- diff --git a/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java b/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java index 513513c..2cd96a6 100644 --- a/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java +++ b/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java @@ -18,14 +18,11 @@ package org.apache.kylin.cube.cuboid; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - +import com.google.common.base.Function; +import com.google.common.collect.Collections2; +import com.google.common.collect.ComparisonChain; +import com.google.common.collect.Lists; +import org.apache.commons.lang.StringUtils; import org.apache.kylin.common.util.Bytes; import org.apache.kylin.cube.gridtable.CuboidToGridTableMapping; import org.apache.kylin.cube.model.AggregationGroup; @@ -34,10 +31,13 @@ import org.apache.kylin.cube.model.CubeDesc; import org.apache.kylin.cube.model.RowKeyColDesc; import org.apache.kylin.metadata.model.TblColRef; -import com.google.common.base.Function; -import com.google.common.collect.Collections2; -import com.google.common.collect.ComparisonChain; -import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; public class Cuboid implements Comparable { @@ -222,7 +222,8 @@ public class Cuboid implements Comparable { return true; } -hier: for (HierarchyMask hierarchyMasks : hierarchyMaskList) { +hier: +for (HierarchyMask hierarchyMasks : hierarchyMaskList) { long result = cuboidID & hierarchyMasks.fullMask; if (result > 0) { // if match one of the hierarchy constrains, return true; @@ -385,11 +386,13 @@ public class Cuboid implements Comparable { public static String getDisplayName(long cuboidID, int dimensionCount) { StringBuilder sb = new StringBuilder(); -String temp = Long.toString(cuboidID); -for (int i = 0; i < dimensionCount - temp.length(); i++) { -sb.append("0"); +for (int i = 0; i < dimensionCount; ++i) { +if ((cuboidID & (1L << i)) == 0) { +sb.append('0'); +} else { +sb.append('1'); +} } -sb.append(temp); -return sb.toString(); +return StringUtils.reverse(sb.toString()); } } http://git-wip-us.apache.org/repos/asf/kylin/blob/c4be5461/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/CubeStatsReader.java -- diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/CubeStatsReader.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/CubeStatsReader.java index e842c01..57e93c3 100644 --- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/CubeStatsReader.java +++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/CubeStatsReader.java @@ -241,7 +241,7 @@ public class CubeStatsReader { CuboidScheduler scheduler = new CuboidScheduler(cubeDesc); long baseCuboid = Cuboid.getBaseCuboidId(cubeDesc); int dimensionCount = Long.bitCount(baseCuboid); -printCuboidInfoTree(0L, baseCuboid, scheduler, cuboidRows, cuboidSizes, dimensionCount, 0, out); +printCuboidInfoTree(-1L, baseCuboid, scheduler, cuboidRows, cuboidSizes, dimensionCount, 0, out); } private static void printCuboidInfoTree(long parent, long cuboidID, final CuboidScheduler scheduler, Map
[41/50] [abbrv] kylin git commit: KYLIN-1286 fix java license files
KYLIN-1286 fix java license files Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/a44a57c0 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/a44a57c0 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/a44a57c0 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: a44a57c0c451469a0d42bdc87a5b7191a7dda6b6 Parents: d0e096a Author: lidongsjtuAuthored: Fri Mar 11 16:20:51 2016 +0800 Committer: lidongsjtu Committed: Fri Mar 11 16:20:51 2016 +0800 -- .../kylin/cube/gridtable/CubeCodeSystem.java| 18 ++ .../kylin/cube/gridtable/CubeGridTable.java | 18 ++ .../gridtable/CuboidToGridTableMapping.java | 18 ++ .../kylin/cube/inmemcubing/CuboidResult.java| 18 ++ .../cube/model/CubeJoinedFlatTableDesc.java | 18 ++ .../kylin/gridtable/DefaultGTComparator.java| 18 ++ .../kylin/gridtable/GTAggregateScanner.java | 18 ++ .../org/apache/kylin/gridtable/GTBuilder.java | 18 ++ .../apache/kylin/gridtable/GTFilterScanner.java | 18 ++ .../java/org/apache/kylin/gridtable/GTInfo.java | 18 ++ .../apache/kylin/gridtable/GTInvertedIndex.java | 18 ++ .../gridtable/GTInvertedIndexOfColumn.java | 18 ++ .../org/apache/kylin/gridtable/GTRecord.java| 18 ++ .../org/apache/kylin/gridtable/GTRowBlock.java | 18 ++ .../kylin/gridtable/GTSampleCodeSystem.java | 18 ++ .../org/apache/kylin/gridtable/GTScanRange.java | 18 ++ .../kylin/gridtable/GTScanRangePlanner.java | 18 ++ .../apache/kylin/gridtable/GTScanRequest.java | 18 ++ .../java/org/apache/kylin/gridtable/GTUtil.java | 18 ++ .../org/apache/kylin/gridtable/GridTable.java | 18 ++ .../apache/kylin/gridtable/IGTCodeSystem.java | 18 ++ .../apache/kylin/gridtable/IGTComparator.java | 18 ++ .../org/apache/kylin/gridtable/IGTScanner.java | 18 ++ .../org/apache/kylin/gridtable/IGTStore.java| 18 ++ .../org/apache/kylin/gridtable/IGTWriter.java | 18 ++ .../gridtable/memstore/GTSimpleMemStore.java| 18 ++ .../kylin/engine/IStreamingCubingEngine.java| 18 ++ .../java/org/apache/kylin/job/lock/JobLock.java | 18 ++ .../org/apache/kylin/job/lock/MockJobLock.java | 18 ++ .../apache/kylin/job/BasicLocalMetaTest.java| 18 ++ .../kylin/storage/ICachableStorageQuery.java| 18 ++ .../cache/AbstractCacheFledgedQuery.java| 18 ++ .../storage/cache/CacheFledgedDynamicQuery.java | 18 ++ .../storage/cache/CacheFledgedStaticQuery.java | 18 ++ .../kylin/storage/cache/StreamSQLResult.java| 18 ++ .../storage/cache/TsConditionExtractor.java | 18 ++ .../apache/kylin/storage/util/SizeOfUtil.java | 18 ++ .../kylin/storage/cache/DynamicCacheTest.java | 18 ++ .../apache/kylin/storage/cache/EhcacheTest.java | 18 ++ .../kylin/storage/cache/StaticCacheTest.java| 18 ++ .../kylin/storage/cache/StorageMockUtils.java | 18 ++ .../kylin/storage/hybrid/HybridManagerTest.java | 18 ++ .../storage/translate/ColumnValueRangeTest.java | 18 ++ .../kylin/engine/mr/ByteArrayWritable.java | 18 ++ .../java/org/apache/kylin/engine/mr/MRUtil.java | 18 ++ .../engine/mr/steps/BaseCuboidMapperBase.java | 18 ++ .../engine/mr/steps/CubingExecutableUtil.java | 18 ++ .../mr/steps/FactDistinctColumnPartitioner.java | 18 ++ .../mr/steps/FactDistinctColumnsMapperBase.java | 18 ++ .../engine/mr/steps/InMemCuboidMapper.java | 18 ++ .../engine/mr/steps/InMemCuboidReducer.java | 18 ++ .../kylin/engine/mr/steps/KVGTRecordWriter.java | 18 ++ .../mr/steps/MapContextGTRecordWriter.java | 18 ++ .../steps/FactDistinctColumnsReducerTest.java | 18 ++ .../kylin/engine/streaming/BootstrapConfig.java | 18 ++ .../kylin/engine/streaming/cli/MonitorCLI.java | 18 ++ .../streaming/monitor/StreamingMonitor.java | 18 ++ .../model/IIKeyValueCodecWithState.java | 18 ++ .../measure/FixedPointLongCodecTest.java| 18 ++ .../java/org/apache/kylin/jdbc/KylinClient.java | 18
[01/50] [abbrv] kylin git commit: KYLIN-1383 remove deploy.env from front end, for permission control only depend on acl.defaultRole and acl.adminRole in kylin.properties
Repository: kylin Updated Branches: refs/heads/1.5.x-HBase1.1.3 [created] dffbbf3bb KYLIN-1383 remove deploy.env from front end, for permission control only depend on acl.defaultRole and acl.adminRole in kylin.properties Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/2d4922dc Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/2d4922dc Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/2d4922dc Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 2d4922dc6a55aa9376d424f1fce5454f7151e3de Parents: c4d94f7 Author: JasonAuthored: Thu Mar 3 14:24:38 2016 +0800 Committer: Jason Committed: Thu Mar 3 14:25:32 2016 +0800 -- webapp/app/js/services/kylinProperties.js | 1 + webapp/app/partials/jobs/jobs.html | 2 +- webapp/app/partials/models/models.html | 2 +- webapp/app/partials/projects/projects.html | 2 +- webapp/app/partials/query/query.html | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/2d4922dc/webapp/app/js/services/kylinProperties.js -- diff --git a/webapp/app/js/services/kylinProperties.js b/webapp/app/js/services/kylinProperties.js index 546db2b..68e8766 100644 --- a/webapp/app/js/services/kylinProperties.js +++ b/webapp/app/js/services/kylinProperties.js @@ -55,6 +55,7 @@ KylinApp.service('kylinConfig', function (AdminService, $log) { return false; } + //deprecated this.getDeployEnv = function () { this.deployEnv = this.getProperty("deploy.env"); if (!this.deployEnv) { http://git-wip-us.apache.org/repos/asf/kylin/blob/2d4922dc/webapp/app/partials/jobs/jobs.html -- diff --git a/webapp/app/partials/jobs/jobs.html b/webapp/app/partials/jobs/jobs.html index daf4578..cc5840b 100644 --- a/webapp/app/partials/jobs/jobs.html +++ b/webapp/app/partials/jobs/jobs.html @@ -22,7 +22,7 @@ - + http://git-wip-us.apache.org/repos/asf/kylin/blob/2d4922dc/webapp/app/partials/models/models.html -- diff --git a/webapp/app/partials/models/models.html b/webapp/app/partials/models/models.html index 88cc6f3..c8e6ed1 100644 --- a/webapp/app/partials/models/models.html +++ b/webapp/app/partials/models/models.html @@ -21,7 +21,7 @@ - + http://git-wip-us.apache.org/repos/asf/kylin/blob/2d4922dc/webapp/app/partials/projects/projects.html -- diff --git a/webapp/app/partials/projects/projects.html b/webapp/app/partials/projects/projects.html index 26a2037..96e4a91 100644 --- a/webapp/app/partials/projects/projects.html +++ b/webapp/app/partials/projects/projects.html @@ -17,7 +17,7 @@ --> - Project + Project http://git-wip-us.apache.org/repos/asf/kylin/blob/2d4922dc/webapp/app/partials/query/query.html -- diff --git a/webapp/app/partials/query/query.html b/webapp/app/partials/query/query.html index 0af08d6..69fe649 100644 --- a/webapp/app/partials/query/query.html +++ b/webapp/app/partials/query/query.html @@ -21,7 +21,7 @@ - +
[14/50] [abbrv] kylin git commit: KYLIN-1387 should support empty segment
KYLIN-1387 should support empty segment Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/9352e5a9 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/9352e5a9 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/9352e5a9 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 9352e5a9e87e8b7bae41303ac1556ca7b7dc0023 Parents: 929c7a4 Author: shaofengshiAuthored: Tue Feb 16 09:42:34 2016 +0800 Committer: shaofengshi Committed: Tue Mar 8 12:19:54 2016 +0800 -- .../hbase/steps/SequenceFileCuboidWriter.java | 48 +++- 1 file changed, 26 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/9352e5a9/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/SequenceFileCuboidWriter.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/SequenceFileCuboidWriter.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/SequenceFileCuboidWriter.java index 4d76522..8c2d5e4 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/SequenceFileCuboidWriter.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/SequenceFileCuboidWriter.java @@ -25,35 +25,39 @@ public class SequenceFileCuboidWriter extends KVGTRecordWriter { public SequenceFileCuboidWriter(CubeDesc cubeDesc, CubeSegment segment) { super(cubeDesc, segment); +try { +initiate(); +} catch (IOException e) { + throw new RuntimeException(e); +} } - -@Override -protected void writeAsKeyValue(ByteArrayWritable key, ByteArrayWritable value) throws IOException { +protected void initiate() throws IOException { if (writer == null) { -synchronized (SequenceFileCuboidWriter.class) { -if (writer == null) { -JobBuilderSupport jobBuilderSupport = new JobBuilderSupport(cubeSegment, "SYSTEM"); -String cuboidRoot = jobBuilderSupport.getCuboidRootPath(cubeSegment); -Path cuboidPath = new Path(cuboidRoot); -FileSystem fs = HadoopUtil.getFileSystem(cuboidRoot); -try { -if (fs.exists(cuboidPath)) { -fs.delete(cuboidPath, true); -} - -fs.mkdirs(cuboidPath); -} finally { -IOUtils.closeQuietly(fs); -} - -Path cuboidFile = new Path(cuboidPath, "data.seq"); -logger.debug("Cuboid is written to " + cuboidFile); -writer = SequenceFile.createWriter(HadoopUtil.getCurrentConfiguration(), SequenceFile.Writer.file(cuboidFile), SequenceFile.Writer.keyClass(Text.class), SequenceFile.Writer.valueClass(Text.class)); +JobBuilderSupport jobBuilderSupport = new JobBuilderSupport(cubeSegment, "SYSTEM"); +String cuboidRoot = jobBuilderSupport.getCuboidRootPath(cubeSegment); +Path cuboidPath = new Path(cuboidRoot); +FileSystem fs = HadoopUtil.getFileSystem(cuboidRoot); +try { +if (fs.exists(cuboidPath)) { +fs.delete(cuboidPath, true); } + +fs.mkdirs(cuboidPath); +} finally { +IOUtils.closeQuietly(fs); } + +Path cuboidFile = new Path(cuboidPath, "data.seq"); +logger.debug("Cuboid is written to " + cuboidFile); +writer = SequenceFile.createWriter(HadoopUtil.getCurrentConfiguration(), SequenceFile.Writer.file(cuboidFile), SequenceFile.Writer.keyClass(Text.class), SequenceFile.Writer.valueClass(Text.class)); } +} + +@Override +protected void writeAsKeyValue(ByteArrayWritable key, ByteArrayWritable value) throws IOException { + Text outputValue = new Text(); Text outputKey = new Text(); outputKey.set(key.array(), key.offset(), key.length());
[31/50] [abbrv] kylin git commit: KYLIN-1431 load streaming table ui update add cluster info when add table
KYLIN-1431 load streaming table ui update add cluster info when add table Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/890577da Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/890577da Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/890577da Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 890577dad510587400640b40e16810e5caa43df2 Parents: 3569b22 Author: JasonAuthored: Wed Mar 9 19:01:42 2016 +0800 Committer: Jason Committed: Fri Mar 11 10:58:35 2016 +0800 -- .../kylin/rest/controller/CubeController.java | 68 --- .../kylin/rest/service/StreamingService.java| 4 +- webapp/app/js/controllers/cubeEdit.js | 82 ++ webapp/app/js/controllers/cubeRefresh.js| 1 - webapp/app/js/controllers/cubeSchema.js | 2 +- webapp/app/js/controllers/sourceMeta.js | 82 -- webapp/app/js/controllers/streamingConfig.js| 8 ++ webapp/app/js/model/modelsManager.js| 1 + webapp/app/less/app.less| 4 + .../partials/cubeDesigner/streamingConfig.html | 16 +-- .../app/partials/tables/loadStreamingTable.html | 89 +++ webapp/app/partials/tables/table_load.html | 112 +-- 12 files changed, 242 insertions(+), 227 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/890577da/server/src/main/java/org/apache/kylin/rest/controller/CubeController.java -- diff --git a/server/src/main/java/org/apache/kylin/rest/controller/CubeController.java b/server/src/main/java/org/apache/kylin/rest/controller/CubeController.java index e60f330..bc00795 100644 --- a/server/src/main/java/org/apache/kylin/rest/controller/CubeController.java +++ b/server/src/main/java/org/apache/kylin/rest/controller/CubeController.java @@ -356,74 +356,6 @@ public class CubeController extends BasicController { throw new InternalErrorException(e.getLocalizedMessage(), e); } -boolean createStreamingConfigSuccess = false, createKafkaConfigSuccess = false; -StreamingConfig streamingConfig = null; -KafkaConfig kafkaConfig = null; - -boolean isStreamingCube = cubeRequest.getStreamingCube() != null && cubeRequest.getStreamingCube().equals("true"); -try { -//streaming Cube -if (isStreamingCube) { -streamingConfig = deserializeStreamingDesc(cubeRequest); -kafkaConfig = deserializeKafkaDesc(cubeRequest); -// validate before create, rollback when error -if (kafkaConfig == null) { -cubeRequest.setMessage("No KafkaConfig info defined."); -return cubeRequest; -} -if (streamingConfig == null) { -cubeRequest.setMessage("No StreamingConfig info defined."); -return cubeRequest; -} - -try { -streamingConfig.setUuid(UUID.randomUUID().toString()); -streamingService.createStreamingConfig(streamingConfig); -createStreamingConfigSuccess = true; -} catch (IOException e) { -logger.error("Failed to save StreamingConfig:" + e.getLocalizedMessage(), e); -throw new InternalErrorException("Failed to save StreamingConfig: " + e.getLocalizedMessage()); -} -try { -kafkaConfig.setUuid(UUID.randomUUID().toString()); -kafkaConfigService.createKafkaConfig(kafkaConfig); -createKafkaConfigSuccess = true; -} catch (IOException e) { -logger.error("Failed to save KafkaConfig:" + e.getLocalizedMessage(), e); -throw new InternalErrorException("Failed to save KafkaConfig: " + e.getLocalizedMessage()); -} - -} -} finally { -//rollback if failed -if (isStreamingCube) { -if (createStreamingConfigSuccess == false || createKafkaConfigSuccess == false) { -try { -cubeService.deleteCube(cubeInstance); -} catch (Exception ex) { -throw new InternalErrorException("Failed to rollback on delete cube. " + " Caused by: " + ex.getMessage(), ex); -} -if (createStreamingConfigSuccess == true) { -try { - streamingService.dropStreamingConfig(streamingConfig); -} catch (IOException e) { -
[02/50] [abbrv] kylin git commit: KYLIN-1466 Update kylin.sh and bring denpendencies to runnable classes
KYLIN-1466 Update kylin.sh and bring denpendencies to runnable classes Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/daeaf084 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/daeaf084 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/daeaf084 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: daeaf08444ebd86a9de4e8addafa7541c25523be Parents: 2d4922d Author: lidongsjtuAuthored: Thu Mar 3 23:26:32 2016 +0800 Committer: lidongsjtu Committed: Thu Mar 3 23:26:55 2016 +0800 -- build/bin/kylin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/daeaf084/build/bin/kylin.sh -- diff --git a/build/bin/kylin.sh b/build/bin/kylin.sh index a21928e..f4d9fac 100644 --- a/build/bin/kylin.sh +++ b/build/bin/kylin.sh @@ -206,7 +206,7 @@ then export HBASE_CLASSPATH=${KYLIN_HOME}/lib/*:$hive_dependency:${HBASE_CLASSPATH} -exec hbase -Dlog4j.configuration=kylin-log4j.properties "$@" +exec hbase ${KYLIN_EXTRA_START_OPTS} -Dkylin.hive.dependency=${hive_dependency} -Dkylin.hbase.dependency=${hbase_dependency} -Dlog4j.configuration=kylin-log4j.properties "$@" else echo "usage: kylin.sh start or kylin.sh stop"
[46/50] [abbrv] kylin git commit: KYLIN-1226 use low memory config for sandbox CI
KYLIN-1226 use low memory config for sandbox CI Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/4e5a936c Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/4e5a936c Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/4e5a936c Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 4e5a936c22997c3ba081a229053b93ea27c7ab46 Parents: 4aeb76b Author: Yang LiAuthored: Sat Mar 12 11:01:12 2016 +0800 Committer: Yang Li Committed: Sat Mar 12 11:01:12 2016 +0800 -- build/conf/kylin.properties | 2 +- .../java/org/apache/kylin/common/KylinConfigBase.java | 12 +--- .../org/apache/kylin/rest/util/Log4jConfigListener.java | 4 +--- 3 files changed, 11 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/4e5a936c/build/conf/kylin.properties -- diff --git a/build/conf/kylin.properties b/build/conf/kylin.properties index e87494d..68678cc 100644 --- a/build/conf/kylin.properties +++ b/build/conf/kylin.properties @@ -161,7 +161,7 @@ kylin.web.contact_mail= ###config info for front### #env DEV|QA|PROD -deploy.env=DEV +deploy.env=QA ###deprecated configs### kylin.sandbox=true http://git-wip-us.apache.org/repos/asf/kylin/blob/4e5a936c/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java -- diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java index 6a47321..e3a73e8 100644 --- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java +++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java @@ -119,6 +119,10 @@ public class KylinConfigBase implements Serializable { // +public boolean isDevEnv() { +return "DEV".equals(getOptional("deploy.env", "DEV")); +} + public String getMetadataUrl() { return getOptional("kylin.metadata.url"); } @@ -485,10 +489,12 @@ public class KylinConfigBase implements Serializable { } public Map getCubingInMemMRJobConfOverride() { -String str = getOptional("kylin.job.cubing.inmem.mrjob_conf_override", // -"mapreduce.map.java.opts=-Xmx2700m; mapreduce.map.memory.mb=3072; mapreduce.task.io.sort.mb=200"); +// in-mem cubing requires big memory, however dev env (sandbox) may not have that much +String defaultOverride = isDevEnv() ? "" : "mapreduce.map.java.opts=-Xmx2700m; mapreduce.map.memory.mb=3072; mapreduce.task.io.sort.mb=200"; +String override = getOptional("kylin.job.cubing.inmem.mrjob_conf_override", defaultOverride); + Map result = Maps.newHashMap(); -for (String pair : str.split(";")) { +for (String pair : override.split(";")) { int cut = pair.indexOf('='); if (cut < 0) continue; http://git-wip-us.apache.org/repos/asf/kylin/blob/4e5a936c/server/src/main/java/org/apache/kylin/rest/util/Log4jConfigListener.java -- diff --git a/server/src/main/java/org/apache/kylin/rest/util/Log4jConfigListener.java b/server/src/main/java/org/apache/kylin/rest/util/Log4jConfigListener.java index 23b327a..7e79511 100644 --- a/server/src/main/java/org/apache/kylin/rest/util/Log4jConfigListener.java +++ b/server/src/main/java/org/apache/kylin/rest/util/Log4jConfigListener.java @@ -27,9 +27,7 @@ public class Log4jConfigListener extends org.springframework.web.util.Log4jConfi private boolean isDebugTomcat; public Log4jConfigListener() { -// check if is DebugTomcat -String property = System.getProperty(KylinConfig.KYLIN_CONF); -this.isDebugTomcat = property != null && property.contains("examples/test_case_data/sandbox"); +this.isDebugTomcat = KylinConfig.getInstanceFromEnv().isDevEnv(); } @Override
[33/50] [abbrv] kylin git commit: minor, enable some job configurations on mapper mem
minor, enable some job configurations on mapper mem Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/18d4a5ec Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/18d4a5ec Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/18d4a5ec Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 18d4a5ecf83e951c35bb628430d5da8d9707f857 Parents: 6836815 Author: lidongsjtuAuthored: Fri Mar 11 12:43:23 2016 +0800 Committer: lidongsjtu Committed: Fri Mar 11 12:45:44 2016 +0800 -- build/conf/kylin_job_conf.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/18d4a5ec/build/conf/kylin_job_conf.xml -- diff --git a/build/conf/kylin_job_conf.xml b/build/conf/kylin_job_conf.xml index f02004e..052021c 100644 --- a/build/conf/kylin_job_conf.xml +++ b/build/conf/kylin_job_conf.xml @@ -56,7 +56,6 @@ - mapred.task.timeout @@ -77,4 +75,4 @@ Set task timeout to 1 hour - \ No newline at end of file +
[32/50] [abbrv] kylin git commit: fix Linkage Error due to duplicate loaded protobuf jar
fix Linkage Error due to duplicate loaded protobuf jar Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/6836815b Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/6836815b Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/6836815b Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 6836815b921c9a7a29dc9e44c34a70f7823b42ca Parents: 376d695 Author: Hongbin MaAuthored: Fri Mar 11 12:12:21 2016 +0800 Committer: Hongbin Ma Committed: Fri Mar 11 12:12:26 2016 +0800 -- atopcalcite/pom.xml | 6 ++ jdbc/pom.xml| 6 ++ 2 files changed, 12 insertions(+) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/6836815b/atopcalcite/pom.xml -- diff --git a/atopcalcite/pom.xml b/atopcalcite/pom.xml index ba5ab1a..93f52b7 100644 --- a/atopcalcite/pom.xml +++ b/atopcalcite/pom.xml @@ -41,6 +41,12 @@ org.apache.calcite calcite-avatica + + +com.google.protobuf +protobuf-java + + http://git-wip-us.apache.org/repos/asf/kylin/blob/6836815b/jdbc/pom.xml -- diff --git a/jdbc/pom.xml b/jdbc/pom.xml index dae9d1e..805f34f 100644 --- a/jdbc/pom.xml +++ b/jdbc/pom.xml @@ -44,6 +44,12 @@ org.apache.calcite calcite-avatica + + +com.google.protobuf +protobuf-java + + commons-httpclient
[49/50] [abbrv] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.1 API
http://git-wip-us.apache.org/repos/asf/kylin/blob/dffbbf3b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java index 7ac4be1..dddb2ad 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java @@ -129,7 +129,7 @@ public class CubeVisitService extends CubeVisitProtos.CubeVisitService implement if (shardLength == 0) { return; } -byte[] regionStartKey = ArrayUtils.isEmpty(region.getStartKey()) ? new byte[shardLength] : region.getStartKey(); +byte[] regionStartKey = ArrayUtils.isEmpty(region.getRegionInfo().getStartKey()) ? new byte[shardLength] : region.getRegionInfo().getStartKey(); Bytes.putBytes(rawScan.startKey, 0, regionStartKey, 0, shardLength); Bytes.putBytes(rawScan.endKey, 0, regionStartKey, 0, shardLength); } @@ -150,7 +150,7 @@ public class CubeVisitService extends CubeVisitProtos.CubeVisitService implement try { this.serviceStartTime = System.currentTimeMillis(); -region = env.getRegion(); +region = (HRegion)env.getRegion(); region.startRegionOperation(); GTScanRequest scanReq = GTScanRequest.serializer.deserialize(ByteBuffer.wrap(HBaseZeroCopyByteString.zeroCopyGetBytes(request.getGtScanRequest(; http://git-wip-us.apache.org/repos/asf/kylin/blob/dffbbf3b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IICreateHTableJob.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IICreateHTableJob.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IICreateHTableJob.java index 9c96f21..a277eeb 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IICreateHTableJob.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IICreateHTableJob.java @@ -24,7 +24,8 @@ import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.TableName; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.io.compress.Compression; import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding; import org.apache.hadoop.hbase.regionserver.DisabledRegionSplitPolicy; @@ -32,6 +33,7 @@ import org.apache.hadoop.hbase.security.User; import org.apache.kylin.common.KylinConfig; import org.apache.kylin.common.util.BytesUtil; import org.apache.kylin.engine.mr.common.AbstractHadoopJob; +import org.apache.kylin.storage.hbase.HBaseConnection; import org.apache.kylin.storage.hbase.util.IIDeployCoprocessorCLI; import org.apache.kylin.invertedindex.IIInstance; import org.apache.kylin.invertedindex.IIManager; @@ -47,7 +49,7 @@ public class IICreateHTableJob extends AbstractHadoopJob { @Override public int run(String[] args) throws Exception { Options options = new Options(); -HBaseAdmin admin = null; +Admin admin = null; try { options.addOption(OPTION_II_NAME); options.addOption(OPTION_HTABLE_NAME); @@ -63,10 +65,11 @@ public class IICreateHTableJob extends AbstractHadoopJob { Configuration conf = HBaseConfiguration.create(getConf()); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); // check if the table already exists -admin = new HBaseAdmin(conf); -if (admin.tableExists(tableName)) { -if (admin.isTableEnabled(tableName)) { +admin = conn.getAdmin(); +if (admin.tableExists(TableName.valueOf(tableName))) { +if (admin.isTableEnabled(TableName.valueOf(tableName))) { logger.info("Table " + tableName + " already exists and is enabled, no need to create."); return 0; } else { http://git-wip-us.apache.org/repos/asf/kylin/blob/dffbbf3b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/InvertedIndexStorageQuery.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/InvertedIndexStorageQuery.java
[12/50] [abbrv] kylin git commit: KYLIN-1420 enhance and update test case
KYLIN-1420 enhance and update test case Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/250978d8 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/250978d8 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/250978d8 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 250978d887e577582f26fc05036d6a4af82dfd0b Parents: 3736f72 Author: shaofengshiAuthored: Mon Feb 15 18:06:18 2016 +0800 Committer: shaofengshi Committed: Tue Mar 8 12:15:11 2016 +0800 -- .../kylin/gridtable/GTScanRangePlanner.java | 27 .../kylin/gridtable/DictGridTableTest.java | 2 +- 2 files changed, 11 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/250978d8/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java -- diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java index d314dde..559a245 100644 --- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java +++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java @@ -1,17 +1,8 @@ package org.apache.kylin.gridtable; -import java.util.ArrayList; -import java.util.BitSet; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; import org.apache.kylin.common.debug.BackdoorToggles; import org.apache.kylin.common.util.ByteArray; import org.apache.kylin.common.util.ImmutableBitSet; @@ -26,9 +17,7 @@ import org.apache.kylin.metadata.model.TblColRef; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import com.google.common.collect.Sets; +import java.util.*; public class GTScanRangePlanner { @@ -108,8 +97,10 @@ public class GTScanRangePlanner { for (ColumnRange range : andDimRanges) { if (partitionColRef != null && range.column.equals(partitionColRef)) { if (rangeStartEndComparator.comparator.compare(segmentStartAndEnd.getFirst(), range.end) <= 0 // -&& rangeStartEndComparator.comparator.compare(range.begin, segmentStartAndEnd.getSecond()) <= 0) { -//segment range is [Closed,Open), but segmentStartAndEnd.getSecond() might be rounded, so use <=. +&& (rangeStartEndComparator.comparator.compare(range.begin, segmentStartAndEnd.getSecond()) < 0 // +|| rangeStartEndComparator.comparator.compare(range.begin, segmentStartAndEnd.getSecond()) == 0 // +&& (range.op == FilterOperatorEnum.EQ || range.op == FilterOperatorEnum.LTE || range.op == FilterOperatorEnum.GTE || range.op == FilterOperatorEnum.IN))) { +//segment range is [Closed,Open), but segmentStartAndEnd.getSecond() might be rounded, so use <= when has equals in condition. } else { logger.debug("Pre-check partition col filter failed, partitionColRef {}, segment start {}, segment end {}, range begin {}, range end {}",// new Object[] { partitionColRef, makeReadable(segmentStartAndEnd.getFirst()), makeReadable(segmentStartAndEnd.getSecond()), makeReadable(range.begin), makeReadable(range.end) }); @@ -346,9 +337,11 @@ public class GTScanRangePlanner { private ByteArray begin = ByteArray.EMPTY; private ByteArray end = ByteArray.EMPTY; private Set valueSet; +private FilterOperatorEnum op; public ColumnRange(TblColRef column, Set values, FilterOperatorEnum op) { this.column = column; +this.op = op; switch (op) { case EQ: http://git-wip-us.apache.org/repos/asf/kylin/blob/250978d8/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java -- diff --git a/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java b/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java index df69c17..674aa15 100644 --- a/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java +++ b/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java @@ -118,7 +118,7 @@ public class DictGridTableTest {
[23/50] [abbrv] kylin git commit: KYLIN-1464 prevent NullPointerException when CubeDesc init failed due to IllegalStateException
KYLIN-1464 prevent NullPointerException when CubeDesc init failed due to IllegalStateException Signed-off-by: Hongbin MaProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/ed57c3b3 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/ed57c3b3 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/ed57c3b3 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: ed57c3b30c8680c2bcb73b6d8b889d05b952d596 Parents: 26233f7 Author: John Zhao Authored: Wed Mar 2 14:51:58 2016 -0800 Committer: Hongbin Ma Committed: Thu Mar 10 09:27:10 2016 +0800 -- .../src/main/java/org/apache/kylin/cube/CubeInstance.java | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/ed57c3b3/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java -- diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java b/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java index 2862d4f..d89e736 100644 --- a/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java +++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java @@ -125,7 +125,12 @@ public class CubeInstance extends RootPersistentEntity implements IRealization, @Override public DataModelDesc getDataModelDesc() { -return this.getDescriptor().getModel(); +CubeDesc cubeDesc = this.getDescriptor(); +if (cubeDesc != null) { +return cubeDesc.getModel(); +} else { +return null; +} } public boolean isReady() {
[13/50] [abbrv] kylin git commit: KYLIN-1387 Streaming cubing doesn't generate cuboids files on HDFS, cause cube merge failure
KYLIN-1387 Streaming cubing doesn't generate cuboids files on HDFS, cause cube merge failure Conflicts: engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/MapContextGTRecordWriter.java Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/929c7a49 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/929c7a49 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/929c7a49 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 929c7a4908a3cd655ab31e71eb6453971f3acd36 Parents: 250978d Author: shaofengshiAuthored: Tue Feb 2 17:34:46 2016 +0800 Committer: shaofengshi Committed: Tue Mar 8 12:19:36 2016 +0800 -- .../cube/inmemcubing/CompoundCuboidWriter.java | 57 ++ .../kylin/cube/inmemcubing/ICuboidWriter.java | 4 +- .../kylin/job/constant/ExecutableConstants.java | 1 + .../kylin/engine/mr/steps/KVGTRecordWriter.java | 81 .../mr/steps/MapContextGTRecordWriter.java | 68 ++-- .../streaming/cube/StreamingCubeBuilder.java| 12 ++- .../storage/hbase/steps/HBaseCuboidWriter.java | 24 +++--- .../hbase/steps/HBaseMROutput2Transition.java | 2 +- .../kylin/storage/hbase/steps/HBaseMRSteps.java | 2 +- .../hbase/steps/HBaseStreamingOutput.java | 8 +- .../hbase/steps/SequenceFileCuboidWriter.java | 75 ++ 11 files changed, 254 insertions(+), 80 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/929c7a49/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/CompoundCuboidWriter.java -- diff --git a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/CompoundCuboidWriter.java b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/CompoundCuboidWriter.java new file mode 100644 index 000..46eef50 --- /dev/null +++ b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/CompoundCuboidWriter.java @@ -0,0 +1,57 @@ +/* + * 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.cube.inmemcubing; + +import org.apache.kylin.gridtable.GTRecord; + +import java.io.IOException; + +/** + */ +public class CompoundCuboidWriter implements ICuboidWriter { + +private Iterable cuboidWriters; + +public CompoundCuboidWriter(Iterable cuboidWriters) { +this.cuboidWriters = cuboidWriters; + +} + +@Override +public void write(long cuboidId, GTRecord record) throws IOException { +for (ICuboidWriter writer : cuboidWriters) { +writer.write(cuboidId, record); +} +} + +@Override +public void flush() throws IOException { +for (ICuboidWriter writer : cuboidWriters) { +writer.flush(); +} + +} + +@Override +public void close() throws IOException { +for (ICuboidWriter writer : cuboidWriters) { +writer.close(); +} + +} +} http://git-wip-us.apache.org/repos/asf/kylin/blob/929c7a49/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/ICuboidWriter.java -- diff --git a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/ICuboidWriter.java b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/ICuboidWriter.java index 9e26e5e..e6cfa02 100644 --- a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/ICuboidWriter.java +++ b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/ICuboidWriter.java @@ -27,7 +27,7 @@ public interface ICuboidWriter { void write(long cuboidId, GTRecord record) throws IOException; -void flush(); +void flush() throws IOException; -void close(); +void close() throws IOException; } http://git-wip-us.apache.org/repos/asf/kylin/blob/929c7a49/core-job/src/main/java/org/apache/kylin/job/constant/ExecutableConstants.java -- diff --git
[44/50] [abbrv] kylin git commit: KYLIN-1378 add topN UI support
KYLIN-1378 add topN UI support Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/bccdd4fd Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/bccdd4fd Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/bccdd4fd Branch: refs/heads/1.5.x-HBase1.1.3 Commit: bccdd4fda268942661eb7c265b573d6824104574 Parents: 7377eda Author: JasonAuthored: Fri Mar 11 18:24:49 2016 +0800 Committer: Jason Committed: Fri Mar 11 18:36:00 2016 +0800 -- webapp/app/js/controllers/cubeEdit.js | 6 +- webapp/app/js/controllers/cubeMeasures.js | 8 +++ webapp/app/js/controllers/streamingConfig.js | 8 +-- webapp/app/js/directives/directives.js | 25 +++- webapp/app/js/model/cubeConfig.js | 11 +++- webapp/app/partials/cubeDesigner/measures.html | 65 + 6 files changed, 103 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/bccdd4fd/webapp/app/js/controllers/cubeEdit.js -- diff --git a/webapp/app/js/controllers/cubeEdit.js b/webapp/app/js/controllers/cubeEdit.js index 748019f..4e9fdea 100755 --- a/webapp/app/js/controllers/cubeEdit.js +++ b/webapp/app/js/controllers/cubeEdit.js @@ -104,7 +104,7 @@ KylinApp.controller('CubeEditCtrl', function ($scope, $q, $routeParams, $locatio //add cube dimension column for specific measure angular.forEach($scope.cubeMetaFrame.dimensions,function(dimension,index){ - if(dimension.column){ + if(dimension.column && dimension.derived == null){ me_columns.push(dimension.column); } }); @@ -484,7 +484,9 @@ KylinApp.controller('CubeEditCtrl', function ($scope, $q, $routeParams, $locatio var newGroup = CubeDescModel.createAggGroup(); newGroup.includes = newUniqAggregationItem; for(var i=1;i 1){ + newGroup.select_rule.joint_dims[i-1] = initJointGroups[i]; +} } $scope.cubeMetaFrame.aggregation_groups.push(newGroup); http://git-wip-us.apache.org/repos/asf/kylin/blob/bccdd4fd/webapp/app/js/controllers/cubeMeasures.js -- diff --git a/webapp/app/js/controllers/cubeMeasures.js b/webapp/app/js/controllers/cubeMeasures.js index f4bfab7..1e81e72 100644 --- a/webapp/app/js/controllers/cubeMeasures.js +++ b/webapp/app/js/controllers/cubeMeasures.js @@ -107,6 +107,10 @@ KylinApp.controller('CubeMeasuresCtrl', function ($scope, $modal,MetaModel,cubes //map right return type for param $scope.measureReturnTypeUpdate = function(){ +if($scope.newMeasure.function.expression == 'TOP_N'){ + return; +} + if($scope.newMeasure.function.expression == 'COUNT'){ $scope.newMeasure.function.parameter.type= 'constant'; } @@ -163,6 +167,10 @@ KylinApp.controller('CubeMeasuresCtrl', function ($scope, $modal,MetaModel,cubes var NextParameterModalCtrl = function ($scope, scope,para,$modalInstance,cubeConfig, CubeService, MessageService, $location, SweetAlert,ProjectModel, loadingRequest,ModelService) { + $scope.newmea={ +"measure":scope.newMeasure + } + $scope.cubeConfig = cubeConfig; $scope.cancel = function () { $modalInstance.dismiss('cancel'); http://git-wip-us.apache.org/repos/asf/kylin/blob/bccdd4fd/webapp/app/js/controllers/streamingConfig.js -- diff --git a/webapp/app/js/controllers/streamingConfig.js b/webapp/app/js/controllers/streamingConfig.js index 4e916db..7ba912f 100644 --- a/webapp/app/js/controllers/streamingConfig.js +++ b/webapp/app/js/controllers/streamingConfig.js @@ -21,9 +21,11 @@ KylinApp.controller('streamingConfigCtrl', function ($scope,StreamingService, $q, $routeParams, $location, $window, $modal, MessageService, CubeDescService, CubeService, JobService, UserService, ProjectService, SweetAlert, loadingRequest, $log, modelConfig, ProjectModel, ModelService, MetaModel, modelsManager, cubesManager, TableModel, $animate,StreamingModel) { $scope.tableModel = TableModel; - $scope.streamingMeta = StreamingModel.createStreamingConfig(); - $scope.kafkaMeta = StreamingModel.createKafkaConfig(); + if($scope.state.mode=='view') { +$scope.streamingMeta = StreamingModel.createStreamingConfig(); +$scope.kafkaMeta = StreamingModel.createKafkaConfig(); + } $scope.addCluster = function () { @@ -105,8 +107,6 @@ KylinApp.controller('streamingConfigCtrl', function ($scope,StreamingService, $q }) } - - }); });
[42/50] [abbrv] kylin git commit: KYLIN-1286 fix java license files
KYLIN-1286 fix java license files Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/85c10686 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/85c10686 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/85c10686 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 85c10686c12f21cf2730893dc7369294256657af Parents: a44a57c Author: lidongsjtuAuthored: Fri Mar 11 16:26:38 2016 +0800 Committer: lidongsjtu Committed: Fri Mar 11 16:26:38 2016 +0800 -- .../storage/hbase/common/coprocessor/AggrKey.java | 18 ++ .../common/coprocessor/CoprocessorBehavior.java | 18 ++ .../hbase/common/coprocessor/FilterDecorator.java | 18 ++ .../storage/hbase/cube/v1/CubeTupleConverter.java | 18 ++ .../cube/v1/filter/generated/FilterProtosExt.java | 18 ++ .../storage/hbase/cube/v2/CubeHBaseScanRPC.java | 18 ++ .../storage/hbase/cube/v2/CubeSegmentScanner.java | 18 ++ .../storage/hbase/cube/v2/CubeStorageQuery.java | 18 ++ .../cube/v2/SequentialCubeTupleIterator.java | 18 ++ .../endpoint/generated/CubeVisitProtos.java | 18 ++ .../endpoint/EndpointTupleConverter.java | 18 ++ .../ii/coprocessor/endpoint/LocalDictionary.java | 18 ++ .../coprocessor/endpoint/generated/IIProtos.java | 18 ++ .../kylin/storage/hbase/steps/CubeHTableUtil.java | 18 ++ .../kylin/storage/hbase/steps/HBaseMRSteps.java | 18 ++ .../storage/hbase/steps/KeyValueCreator.java | 18 ++ .../hbase/steps/SequenceFileCuboidWriter.java | 18 ++ .../storage/hbase/util/CubeMigrationCheckCLI.java | 18 ++ .../storage/hbase/util/HbaseStreamingInput.java | 18 ++ .../kylin/storage/hbase/util/RowCounterCLI.java | 18 ++ .../storage/hbase/util/ZookeeperJobLock.java | 18 ++ .../common/TimeConditionLiteralsReplacerTest.java | 18 ++ .../hbase/common/TsConditionEraserTest.java | 18 ++ 23 files changed, 414 insertions(+) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/85c10686/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/common/coprocessor/AggrKey.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/common/coprocessor/AggrKey.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/common/coprocessor/AggrKey.java index 3fbc69b..e071f44 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/common/coprocessor/AggrKey.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/common/coprocessor/AggrKey.java @@ -1,3 +1,21 @@ +/* + * 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.storage.hbase.common.coprocessor; import java.util.Arrays; http://git-wip-us.apache.org/repos/asf/kylin/blob/85c10686/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/common/coprocessor/CoprocessorBehavior.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/common/coprocessor/CoprocessorBehavior.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/common/coprocessor/CoprocessorBehavior.java index df81177..21dc0d1 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/common/coprocessor/CoprocessorBehavior.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/common/coprocessor/CoprocessorBehavior.java @@ -1,3 +1,21 @@ +/* + * 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.
[07/50] [abbrv] kylin git commit: minor, UI disable modelname edit when edit model
minor, UI disable modelname edit when edit model Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/ecd12669 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/ecd12669 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/ecd12669 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: ecd12669a7d7f8a2febbc5199c5291ccfbf339d9 Parents: 2f44970 Author: JasonAuthored: Fri Mar 4 17:58:30 2016 +0800 Committer: Jason Committed: Fri Mar 4 17:59:12 2016 +0800 -- webapp/app/partials/modelDesigner/model_info.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/ecd12669/webapp/app/partials/modelDesigner/model_info.html -- diff --git a/webapp/app/partials/modelDesigner/model_info.html b/webapp/app/partials/modelDesigner/model_info.html index a290bfb..bace322 100644 --- a/webapp/app/partials/modelDesigner/model_info.html +++ b/webapp/app/partials/modelDesigner/model_info.html @@ -31,7 +31,7 @@ -
[37/50] [abbrv] kylin git commit: KYLIN-1226 apply in-mem conf only to in-mem mr job
KYLIN-1226 apply in-mem conf only to in-mem mr job Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/0232f17e Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/0232f17e Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/0232f17e Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 0232f17ed74a3354c7ffd6647d159a8581626861 Parents: 5e13bba Author: Li YangAuthored: Fri Mar 11 15:03:40 2016 +0800 Committer: Li Yang Committed: Fri Mar 11 15:04:19 2016 +0800 -- build/conf/kylin_job_conf.xml | 14 - .../apache/kylin/common/KylinConfigBase.java| 21 +++- .../kylin/engine/mr/steps/InMemCuboidJob.java | 11 ++ 3 files changed, 31 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/0232f17e/build/conf/kylin_job_conf.xml -- diff --git a/build/conf/kylin_job_conf.xml b/build/conf/kylin_job_conf.xml index 052021c..3ecaeda 100644 --- a/build/conf/kylin_job_conf.xml +++ b/build/conf/kylin_job_conf.xml @@ -55,20 +55,6 @@ Block replication - - -mapreduce.map.java.opts --Xmx2500m - - -mapreduce.map.memory.mb -3072 - - -mapreduce.task.io.sort.mb -200 - - mapred.task.timeout 360 http://git-wip-us.apache.org/repos/asf/kylin/blob/0232f17e/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java -- diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java index 487f78e..6a47321 100644 --- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java +++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java @@ -22,6 +22,7 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.Serializable; +import java.util.Map; import java.util.Properties; import java.util.SortedSet; import java.util.regex.Matcher; @@ -33,6 +34,7 @@ import org.apache.kylin.common.util.CliCommandExecutor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.google.common.collect.Maps; import com.google.common.collect.Sets; @SuppressWarnings("serial") @@ -476,11 +478,28 @@ public class KylinConfigBase implements Serializable { } public int getCubingInMemSamplingPercent() { -int percent = Integer.parseInt(this.getOptional("kylin.job.cubing.inMem.sampling.percent", "30")); +int percent = Integer.parseInt(this.getOptional("kylin.job.cubing.inmem.sampling.percent", "30")); percent = Math.max(percent, 1); percent = Math.min(percent, 100); return percent; } + +public Map getCubingInMemMRJobConfOverride() { +String str = getOptional("kylin.job.cubing.inmem.mrjob_conf_override", // +"mapreduce.map.java.opts=-Xmx2700m; mapreduce.map.memory.mb=3072; mapreduce.task.io.sort.mb=200"); +Map result = Maps.newHashMap(); +for (String pair : str.split(";")) { +int cut = pair.indexOf('='); +if (cut < 0) +continue; +String k = pair.substring(0, cut).trim(); +String v = pair.substring(cut + 1).trim(); +if (k.isEmpty() || v.isEmpty()) +continue; +result.put(k, v); +} +return result; +} public String getHbaseDefaultCompressionCodec() { return getOptional("kylin.hbase.default.compression.codec", ""); http://git-wip-us.apache.org/repos/asf/kylin/blob/0232f17e/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/InMemCuboidJob.java -- diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/InMemCuboidJob.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/InMemCuboidJob.java index d197252..2319451 100644 --- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/InMemCuboidJob.java +++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/InMemCuboidJob.java @@ -20,8 +20,10 @@ package org.apache.kylin.engine.mr.steps; import java.io.IOException; import java.util.Map; +import java.util.Map.Entry; import org.apache.commons.cli.Options; +import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; @@ -97,6 +99,9 @@ public class InMemCuboidJob extends AbstractHadoopJob { job =
[43/50] [abbrv] kylin git commit: KYLIN-1286 fix java license files
KYLIN-1286 fix java license files Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/7377eda2 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/7377eda2 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/7377eda2 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 7377eda2253f7d3250781fbb50ca13af9243f3c5 Parents: 85c1068 Author: Li YangAuthored: Fri Mar 11 16:35:20 2016 +0800 Committer: Li Yang Committed: Fri Mar 11 16:35:20 2016 +0800 -- .../kylin/job/hadoop/invertedindex/IITest.java| 18 ++ .../kylin/job/streaming/KafkaDataLoader.java | 18 ++ .../streaming/StreamingTableDataGenerator.java| 18 ++ 3 files changed, 54 insertions(+) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/7377eda2/assembly/src/test/java/org/apache/kylin/job/hadoop/invertedindex/IITest.java -- diff --git a/assembly/src/test/java/org/apache/kylin/job/hadoop/invertedindex/IITest.java b/assembly/src/test/java/org/apache/kylin/job/hadoop/invertedindex/IITest.java index ac91efb..da25143 100644 --- a/assembly/src/test/java/org/apache/kylin/job/hadoop/invertedindex/IITest.java +++ b/assembly/src/test/java/org/apache/kylin/job/hadoop/invertedindex/IITest.java @@ -1,3 +1,21 @@ +/* + * 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.job.hadoop.invertedindex; import java.io.IOException; http://git-wip-us.apache.org/repos/asf/kylin/blob/7377eda2/assembly/src/test/java/org/apache/kylin/job/streaming/KafkaDataLoader.java -- diff --git a/assembly/src/test/java/org/apache/kylin/job/streaming/KafkaDataLoader.java b/assembly/src/test/java/org/apache/kylin/job/streaming/KafkaDataLoader.java index 4d9c0aa..31fc670 100644 --- a/assembly/src/test/java/org/apache/kylin/job/streaming/KafkaDataLoader.java +++ b/assembly/src/test/java/org/apache/kylin/job/streaming/KafkaDataLoader.java @@ -1,3 +1,21 @@ +/* + * 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.job.streaming; import java.util.List; http://git-wip-us.apache.org/repos/asf/kylin/blob/7377eda2/assembly/src/test/java/org/apache/kylin/job/streaming/StreamingTableDataGenerator.java -- diff --git a/assembly/src/test/java/org/apache/kylin/job/streaming/StreamingTableDataGenerator.java b/assembly/src/test/java/org/apache/kylin/job/streaming/StreamingTableDataGenerator.java index 4ce223e..734c982 100644 --- a/assembly/src/test/java/org/apache/kylin/job/streaming/StreamingTableDataGenerator.java +++ b/assembly/src/test/java/org/apache/kylin/job/streaming/StreamingTableDataGenerator.java @@ -1,3 +1,21 @@ +/* + * 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
[30/50] [abbrv] kylin git commit: KYLIN-1431 load streaming table ui update add cluster info when add table #2
KYLIN-1431 load streaming table ui update add cluster info when add table #2 Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/376d695c Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/376d695c Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/376d695c Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 376d695c5893c482eaba6853929b8a34276ba964 Parents: 890577d Author: JasonAuthored: Thu Mar 10 20:50:25 2016 +0800 Committer: Jason Committed: Fri Mar 11 10:58:35 2016 +0800 -- .../apache/kylin/metadata/model/TableDesc.java | 4 + .../rest/controller/StreamingController.java| 105 ++--- .../kylin/rest/request/StreamingRequest.java| 3 +- .../kylin/rest/response/TableDescResponse.java | 1 + webapp/app/js/controllers/cubeEdit.js | 101 ++-- webapp/app/js/controllers/modelSchema.js| 2 +- webapp/app/js/controllers/sourceMeta.js | 154 +++ webapp/app/js/controllers/streamingConfig.js| 31 +++- webapp/app/js/model/streamingModel.js | 3 +- webapp/app/js/model/tableModel.js | 7 +- webapp/app/partials/cubeDesigner/info.html | 10 +- .../partials/cubeDesigner/kafkaBasicConfig.html | 4 +- .../partials/cubeDesigner/streamingConfig.html | 69 ++--- .../app/partials/modelDesigner/data_model.html | 8 +- .../app/partials/modelDesigner/model_info.html | 6 +- .../app/partials/tables/loadStreamingTable.html | 19 +-- webapp/app/partials/tables/table_detail.html| 12 +- 17 files changed, 343 insertions(+), 196 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/376d695c/core-metadata/src/main/java/org/apache/kylin/metadata/model/TableDesc.java -- diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/model/TableDesc.java b/core-metadata/src/main/java/org/apache/kylin/metadata/model/TableDesc.java index d5e4dbb..65d85dd 100644 --- a/core-metadata/src/main/java/org/apache/kylin/metadata/model/TableDesc.java +++ b/core-metadata/src/main/java/org/apache/kylin/metadata/model/TableDesc.java @@ -180,4 +180,8 @@ public class TableDesc extends RootPersistentEntity implements ISourceAware { public int getSourceType() { return sourceType; } + +public void setSourceType(int sourceType) { +this.sourceType = sourceType; +} } http://git-wip-us.apache.org/repos/asf/kylin/blob/376d695c/server/src/main/java/org/apache/kylin/rest/controller/StreamingController.java -- diff --git a/server/src/main/java/org/apache/kylin/rest/controller/StreamingController.java b/server/src/main/java/org/apache/kylin/rest/controller/StreamingController.java index ecd7571..932ad51 100644 --- a/server/src/main/java/org/apache/kylin/rest/controller/StreamingController.java +++ b/server/src/main/java/org/apache/kylin/rest/controller/StreamingController.java @@ -22,13 +22,17 @@ import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonMappingException; import org.apache.commons.lang.StringUtils; +import org.apache.kylin.common.KylinConfig; import org.apache.kylin.common.util.JsonUtil; import org.apache.kylin.engine.streaming.StreamingConfig; +import org.apache.kylin.metadata.MetadataManager; +import org.apache.kylin.metadata.model.TableDesc; import org.apache.kylin.rest.exception.BadRequestException; import org.apache.kylin.rest.exception.ForbiddenException; import org.apache.kylin.rest.exception.InternalErrorException; import org.apache.kylin.rest.exception.NotFoundException; import org.apache.kylin.rest.request.StreamingRequest; +import org.apache.kylin.rest.service.CubeService; import org.apache.kylin.rest.service.KafkaConfigService; import org.apache.kylin.rest.service.StreamingService; import org.apache.kylin.source.kafka.config.KafkaConfig; @@ -40,7 +44,9 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import java.io.IOException; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.UUID; /** @@ -57,6 +63,9 @@ public class StreamingController extends BasicController { private StreamingService streamingService; @Autowired private KafkaConfigService kafkaConfigService; +@Autowired +private CubeService cubeMgmtService; + @RequestMapping(value = "/getConfig", method = { RequestMethod.GET }) @ResponseBody @@ -89,36 +98,69 @@ public class StreamingController extends BasicController { @RequestMapping(value = "", method = {
[38/50] [abbrv] kylin git commit: KYLIN-1286 fix licenses in resource files
KYLIN-1286 fix licenses in resource files Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/aa49ece1 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/aa49ece1 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/aa49ece1 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: aa49ece1f2cf2a44b590cf2ac938378b3046995e Parents: 0232f17 Author: Li YangAuthored: Fri Mar 11 15:37:15 2016 +0800 Committer: Li Yang Committed: Fri Mar 11 15:37:15 2016 +0800 -- .travis.yml | 1 - build/conf/kylin.properties | 18 -- build/conf/kylin_hive_conf.xml| 17 - build/conf/kylin_job_conf.xml | 17 - dev-support/test_all_against_hdp_2_2_4_2_2.sh | 17 + .../test_case_data/localmeta/kylin.properties | 18 -- examples/test_case_data/sandbox/kylin.properties | 17 - webapp/app/js/controllers/cubeDimensions.js | 4 ++-- webapp/app/js/controllers/cubeMeasures.js | 4 ++-- .../app/partials/tables/loadStreamingTable.html | 17 + 10 files changed, 118 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/aa49ece1/.travis.yml -- diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f5c99a7..000 --- a/.travis.yml +++ /dev/null @@ -1 +0,0 @@ -language: java \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/aa49ece1/build/conf/kylin.properties -- diff --git a/build/conf/kylin.properties b/build/conf/kylin.properties index d694e9f..e87494d 100644 --- a/build/conf/kylin.properties +++ b/build/conf/kylin.properties @@ -1,5 +1,19 @@ -## Config for Kylin Engine ## - +# +# 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. +# # optional information for the owner of kylin platform, it can be your team's email # currently it will be attached to each kylin's htable attribute http://git-wip-us.apache.org/repos/asf/kylin/blob/aa49ece1/build/conf/kylin_hive_conf.xml -- diff --git a/build/conf/kylin_hive_conf.xml b/build/conf/kylin_hive_conf.xml index f91f489..a11d768 100644 --- a/build/conf/kylin_hive_conf.xml +++ b/build/conf/kylin_hive_conf.xml @@ -1,4 +1,19 @@ - + dfs.replication http://git-wip-us.apache.org/repos/asf/kylin/blob/aa49ece1/build/conf/kylin_job_conf.xml -- diff --git a/build/conf/kylin_job_conf.xml b/build/conf/kylin_job_conf.xml index 3ecaeda..19c8847 100644 --- a/build/conf/kylin_job_conf.xml +++ b/build/conf/kylin_job_conf.xml @@ -1,4 +1,19 @@ - + http://git-wip-us.apache.org/repos/asf/kylin/blob/aa49ece1/dev-support/test_all_against_hdp_2_2_4_2_2.sh -- diff --git a/dev-support/test_all_against_hdp_2_2_4_2_2.sh b/dev-support/test_all_against_hdp_2_2_4_2_2.sh index bf21362..0f81d2e 100644 --- a/dev-support/test_all_against_hdp_2_2_4_2_2.sh +++ b/dev-support/test_all_against_hdp_2_2_4_2_2.sh @@ -1,5 +1,22 @@ #!/bin/bash +# +# 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,
[36/50] [abbrv] kylin git commit: clean code
clean code Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/5e13bba0 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/5e13bba0 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/5e13bba0 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 5e13bba0822cafeb02817e5e59c08a3a4b5020c9 Parents: 4662ada Author: Hongbin MaAuthored: Fri Mar 11 14:03:45 2016 +0800 Committer: Hongbin Ma Committed: Fri Mar 11 15:00:35 2016 +0800 -- .../kylin/common/persistence/ResourceStore.java | 26 ++- .../java/org/apache/kylin/cube/CubeSegment.java | 31 +--- .../org/apache/kylin/cube/cuboid/Cuboid.java| 26 +++ .../kylin/job/constant/ExecutableConstants.java | 20 - .../kylin/job/execution/AbstractExecutable.java | 27 +++ .../kylin/engine/mr/BatchCubingJobBuilder.java | 25 --- .../kylin/engine/mr/BatchCubingJobBuilder2.java | 48 ++-- .../kylin/engine/mr/BatchMergeJobBuilder.java | 13 ++-- .../kylin/engine/mr/BatchMergeJobBuilder2.java | 22 +++--- .../org/apache/kylin/engine/mr/CubingJob.java | 56 -- .../kylin/engine/mr/JobBuilderSupport.java | 63 +--- .../engine/mr/common/AbstractHadoopJob.java | 33 - .../kylin/engine/mr/common/BatchConstants.java | 59 ++- .../kylin/engine/mr/common/CubeStatsReader.java | 56 +++--- .../kylin/engine/mr/common/CuboidStatsUtil.java | 2 +- .../mr/invertedindex/BatchIIJobBuilder.java | 21 +++--- .../mr/invertedindex/InvertedIndexJob.java | 7 +- .../engine/mr/steps/BaseCuboidMapperBase.java | 2 +- .../engine/mr/steps/CubingExecutableUtil.java | 78 .../kylin/engine/mr/steps/CuboidReducer.java| 2 +- .../engine/mr/steps/FactDistinctColumnsJob.java | 2 +- .../mr/steps/FactDistinctColumnsMapperBase.java | 2 +- .../mr/steps/FactDistinctColumnsReducer.java| 4 +- .../engine/mr/steps/HiveToBaseCuboidMapper.java | 2 +- .../engine/mr/steps/InMemCuboidMapper.java | 2 +- .../engine/mr/steps/InMemCuboidReducer.java | 2 +- .../engine/mr/steps/MergeDictionaryStep.java| 47 +--- .../engine/mr/steps/MergeStatisticsStep.java| 66 ++--- .../kylin/engine/mr/steps/NDCuboidMapper.java | 4 +- .../engine/mr/steps/SaveStatisticsStep.java | 49 ++-- .../mr/steps/UpdateCubeInfoAfterBuildStep.java | 38 ++ .../mr/steps/UpdateCubeInfoAfterMergeStep.java | 57 ++ .../apache/kylin/engine/spark/SparkCubing.java | 3 +- .../engine/spark/SparkCubingJobBuilder.java | 6 +- .../apache/kylin/rest/service/BasicService.java | 40 +- .../apache/kylin/rest/service/JobService.java | 51 +++-- .../cardinality/ColumnCardinalityMapper.java| 2 +- .../cardinality/HiveColumnCardinalityJob.java | 3 +- .../kylin/storage/hbase/HBaseResourceStore.java | 46 .../kylin/storage/hbase/steps/HBaseMRSteps.java | 78 ++-- .../hbase/steps/HBaseStreamingOutput.java | 2 +- .../hbase/steps/RangeKeyDistributionJob.java| 10 +-- .../steps/RangeKeyDistributionReducer.java | 20 ++--- 43 files changed, 483 insertions(+), 670 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/5e13bba0/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceStore.java -- diff --git a/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceStore.java b/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceStore.java index ccae80b..88ee553 100644 --- a/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceStore.java +++ b/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceStore.java @@ -73,7 +73,7 @@ abstract public class ResourceStore { } return knownImpl; } - + private static ResourceStore createResourceStore(KylinConfig kylinConfig) { List es = new ArrayList(); logger.info("Using metadata url " + kylinConfig.getMetadataUrl() + " for resource store"); @@ -141,7 +141,7 @@ abstract public class ResourceStore { RawResource res = getResourceImpl(resPath); if (res == null) return null; - + DataInputStream din = new DataInputStream(res.inputStream); try { T r = serializer.deserialize(din); @@ -160,25 +160,9 @@ abstract public class ResourceStore { final public long getResourceTimestamp(String resPath) throws IOException { return getResourceTimestampImpl(norm(resPath)); } - + final public List getAllResources(String rangeStart, String rangeEnd, Class clazz, Serializer serializer) throws
[04/50] [abbrv] kylin git commit: KYLIN-1469 Find hive dependencies from jvm if not exists in environment variables
KYLIN-1469 Find hive dependencies from jvm if not exists in environment variables Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/b41c4460 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/b41c4460 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/b41c4460 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: b41c44600f801f80aa379494bd3be9bc77d5fa65 Parents: 8a3e0e0 Author: lidongsjtuAuthored: Fri Mar 4 14:02:28 2016 +0800 Committer: lidongsjtu Committed: Fri Mar 4 14:02:28 2016 +0800 -- .../engine/mr/common/AbstractHadoopJob.java | 22 +++- examples/test_case_data/sandbox/mapred-site.xml | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/b41c4460/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java -- diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java index e4eee96..61983d5 100644 --- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java +++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java @@ -23,7 +23,7 @@ package org.apache.kylin.engine.mr.common; * */ -import static org.apache.hadoop.util.StringUtils.formatTime; +import static org.apache.hadoop.util.StringUtils.*; import java.io.File; import java.io.IOException; @@ -49,6 +49,7 @@ import org.apache.hadoop.mapreduce.InputFormat; import org.apache.hadoop.mapreduce.InputSplit; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; +import org.apache.hadoop.util.ClassUtil; import org.apache.hadoop.util.ReflectionUtils; import org.apache.hadoop.util.Tool; import org.apache.hadoop.util.ToolRunner; @@ -217,6 +218,25 @@ public abstract class AbstractHadoopJob extends Configured implements Tool { if (kylinDependency.length() > 0) kylinDependency.append(","); kylinDependency.append(filteredHive); +} else { + +logger.info("No hive dependency jars set in the environment, will find them from jvm:"); + +try { +String hiveExecJarPath = ClassUtil.findContainingJar(Class.forName("org.apache.hadoop.hive.ql.Driver")); +kylinDependency.append(hiveExecJarPath).append(","); +logger.info("hive-exec jar file: " + hiveExecJarPath); + +String hiveHCatJarPath = ClassUtil.findContainingJar(Class.forName("org.apache.hive.hcatalog.mapreduce.HCatInputFormat")); +kylinDependency.append(hiveHCatJarPath).append(","); +logger.info("hive-catalog jar file: " + hiveHCatJarPath); + +String hiveMetaStoreJarPath = ClassUtil.findContainingJar(Class.forName("org.apache.hadoop.hive.metastore.api.Table")); +kylinDependency.append(hiveMetaStoreJarPath).append(","); +logger.info("hive-metastore jar file: " + hiveMetaStoreJarPath); +} catch (ClassNotFoundException e) { +logger.error("Cannot found hive dependency jars: " + e); +} } // for KylinJobMRLibDir http://git-wip-us.apache.org/repos/asf/kylin/blob/b41c4460/examples/test_case_data/sandbox/mapred-site.xml -- diff --git a/examples/test_case_data/sandbox/mapred-site.xml b/examples/test_case_data/sandbox/mapred-site.xml index 7b1a4be..18f6feb 100644 --- a/examples/test_case_data/sandbox/mapred-site.xml +++ b/examples/test_case_data/sandbox/mapred-site.xml @@ -58,7 +58,7 @@ mapreduce.application.classpath - /tmp/kylin/*,$HADOOP_CONF_DIR,/usr/hdp/${hdp.version}/hbase/lib/hbase-common.jar,/usr/hdp/current/hive-client/conf/,/usr/hdp/${hdp.version}/hive/lib/hive-metastore.jar,/usr/hdp/${hdp.version}/hive/lib/hive-exec.jar,/usr/hdp/${hdp.version}/hive-hcatalog/share/hcatalog/*,$PWD/mr-framework/hadoop/share/hadoop/mapreduce/*:$PWD/mr-framework/hadoop/share/hadoop/mapreduce/lib/*:$PWD/mr-framework/hadoop/share/hadoop/common/*:$PWD/mr-framework/hadoop/share/hadoop/common/lib/*:$PWD/mr-framework/hadoop/share/hadoop/yarn/*:$PWD/mr-framework/hadoop/share/hadoop/yarn/lib/*:$PWD/mr-framework/hadoop/share/hadoop/hdfs/*:$PWD/mr-framework/hadoop/share/hadoop/hdfs/lib/*:/usr/hdp/${hdp.version}/hadoop/lib/hadoop-lzo-0.6.0.${hdp.version}.jar:/usr/hdp/${hdp.version}/hadoop/lib/snappy-java-1.0.4.1.jar:/etc/hadoop/conf/secure +
[25/50] [abbrv] kylin git commit: Merge branch 'master' into 2.x-staging
Merge branch 'master' into 2.x-staging Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/4e48f2ae Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/4e48f2ae Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/4e48f2ae Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 4e48f2ae63b66ebb04147f966fb72008bb939dff Parents: c4be546 13e6a43 Author: Li YangAuthored: Thu Mar 10 15:42:41 2016 +0800 Committer: Li Yang Committed: Thu Mar 10 15:42:41 2016 +0800 -- --
[22/50] [abbrv] kylin git commit: minor, update find hive dependency script to avoid soft links of jars
minor, update find hive dependency script to avoid soft links of jars Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/26233f79 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/26233f79 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/26233f79 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 26233f79bf7fdc3fa1de9ce82e36d0baf47dcd20 Parents: f73abf6 Author: lidongsjtuAuthored: Wed Mar 9 16:14:11 2016 +0800 Committer: lidongsjtu Committed: Wed Mar 9 16:16:37 2016 +0800 -- build/bin/find-hive-dependency.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/26233f79/build/bin/find-hive-dependency.sh -- diff --git a/build/bin/find-hive-dependency.sh b/build/bin/find-hive-dependency.sh index 87f18dd..1650ec0 100644 --- a/build/bin/find-hive-dependency.sh +++ b/build/bin/find-hive-dependency.sh @@ -41,7 +41,7 @@ fi for data in ${arr[@]} do -result=`echo $data | grep -e 'hive-exec[a-z0-9A-Z\.-]*jar'` +result=`echo $data | grep -e 'hive-exec[a-z0-9A-Z\.-]*.jar'` if [ $result ] then hive_exec_path=$data @@ -82,7 +82,7 @@ else hcatalog_home=${HCAT_HOME} fi -hcatalog=`find -L ${hcatalog_home} -name "hive-hcatalog-core[0-9\.-]*jar" 2>&1 | grep -m 1 -v 'Permission denied'` +hcatalog=`find -L ${hcatalog_home} -name "hive-hcatalog-core[0-9\.-]*.jar" 2>&1 | grep -m 1 -v 'Permission denied'` if [ -z "$hcatalog" ] then
[18/50] [abbrv] kylin git commit: initial commit for KYLIN-1431
initial commit for KYLIN-1431 Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/9021f17d Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/9021f17d Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/9021f17d Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 9021f17d85be01bf34b48a7a31be82f53ceb9c8f Parents: 0ec3ed0 Author: shaofengshiAuthored: Wed Mar 2 11:16:46 2016 +0800 Committer: shaofengshi Committed: Tue Mar 8 15:07:04 2016 +0800 -- .../org/apache/kylin/job/CubeMetaExtractor.java | 2 +- build/bin/streaming_build.sh| 4 +- build/bin/streaming_fillgap.sh | 5 +- .../kylin/metadata/model/ISourceAware.java | 1 + .../kylin/engine/streaming/BootstrapConfig.java | 20 +- .../kylin/engine/streaming/IStreamingInput.java | 3 +- .../streaming/OneOffStreamingBuilder.java | 17 +- .../kylin/engine/streaming/StreamingConfig.java | 33 +-- .../engine/streaming/StreamingManager.java | 12 + .../engine/streaming/cli/StreamingCLI.java | 21 +- .../engine/streaming/util/StreamingUtils.java | 18 +- .../kafka/default.streaming_table.json | 21 ++ .../localmeta/kafka/kafka_test.json | 20 -- .../kafka/test_streaming_table_cube.json| 22 -- .../kafka/test_streaming_table_ii.json | 22 -- .../streaming/default.streaming_table.json | 6 + .../localmeta/streaming/kafka_test.json | 20 -- .../streaming/test_streaming_table_cube.json| 8 - .../streaming/test_streaming_table_ii.json | 8 - .../kylin/provision/BuildCubeWithStream.java| 16 +- .../kylin/rest/controller/CubeController.java | 234 --- .../rest/controller/StreamingController.java| 4 +- .../kylin/rest/service/StreamingService.java| 18 +- .../kylin/source/kafka/KafkaStreamingInput.java | 78 --- .../kylin/source/kafka/StreamingParser.java | 6 +- 25 files changed, 163 insertions(+), 456 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/9021f17d/assembly/src/test/java/org/apache/kylin/job/CubeMetaExtractor.java -- diff --git a/assembly/src/test/java/org/apache/kylin/job/CubeMetaExtractor.java b/assembly/src/test/java/org/apache/kylin/job/CubeMetaExtractor.java index 527ef0a..ef27ade 100644 --- a/assembly/src/test/java/org/apache/kylin/job/CubeMetaExtractor.java +++ b/assembly/src/test/java/org/apache/kylin/job/CubeMetaExtractor.java @@ -227,7 +227,7 @@ public class CubeMetaExtractor extends AbstractApplication { private void dealWithStreaming(CubeInstance cube) { for (StreamingConfig streamingConfig : streamingManager.listAllStreaming()) { -if (streamingConfig.getCubeName() != null && streamingConfig.getCubeName().equalsIgnoreCase(cube.getName())) { +if (streamingConfig.getName() != null && streamingConfig.getName().equalsIgnoreCase(cube.getFactTable())) { requiredResources.add(StreamingConfig.concatResourcePath(streamingConfig.getName())); requiredResources.add(KafkaConfig.concatResourcePath(streamingConfig.getName())); } http://git-wip-us.apache.org/repos/asf/kylin/blob/9021f17d/build/bin/streaming_build.sh -- diff --git a/build/bin/streaming_build.sh b/build/bin/streaming_build.sh index a96ecc1..ed19036 100644 --- a/build/bin/streaming_build.sh +++ b/build/bin/streaming_build.sh @@ -20,7 +20,7 @@ source /etc/profile source ~/.bash_profile -STREAMING=$1 +CUBE=$1 INTERVAL=$2 DELAY=$3 CURRENT_TIME_IN_SECOND=`date +%s` @@ -30,4 +30,4 @@ END=$(($CURRENT_TIME - CURRENT_TIME%INTERVAL - DELAY + INTERVAL)) ID="$START"_"$END" echo "building for ${ID}" >> ${KYLIN_HOME}/logs/build_trace.log -sh ${KYLIN_HOME}/bin/kylin.sh streaming start ${STREAMING} ${ID} -start ${START} -end ${END} -streaming ${STREAMING} \ No newline at end of file +sh ${KYLIN_HOME}/bin/kylin.sh streaming start ${CUBE} ${ID} -start ${START} -end ${END} -cube ${CUBE} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/9021f17d/build/bin/streaming_fillgap.sh -- diff --git a/build/bin/streaming_fillgap.sh b/build/bin/streaming_fillgap.sh index 74d9037..c67809a 100644 --- a/build/bin/streaming_fillgap.sh +++ b/build/bin/streaming_fillgap.sh @@ -20,8 +20,7 @@ source /etc/profile source ~/.bash_profile -streaming=$1 -margin=$2 +cube=$1 cd ${KYLIN_HOME} -sh ${KYLIN_HOME}/bin/kylin.sh streaming start ${streaming} fillgap -streaming ${streaming} -fillGap true -margin ${margin} \ No newline at end of file
[09/50] [abbrv] kylin git commit: KYLIN-1474 expose list, remove and cat in metastore.sh
KYLIN-1474 expose list, remove and cat in metastore.sh Signed-off-by: Hongbin MaProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/17c33dc4 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/17c33dc4 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/17c33dc4 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 17c33dc4929121cdb48c3904dc337cd456af845d Parents: 11dc04b Author: John Zhao Authored: Mon Mar 7 14:05:59 2016 -0800 Committer: Hongbin Ma Committed: Tue Mar 8 10:31:12 2016 +0800 -- build/bin/metastore.sh | 24 .../kylin/common/persistence/ResourceTool.java | 3 +++ 2 files changed, 27 insertions(+) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/17c33dc4/build/bin/metastore.sh -- diff --git a/build/bin/metastore.sh b/build/bin/metastore.sh index 05041f9..8908351 100755 --- a/build/bin/metastore.sh +++ b/build/bin/metastore.sh @@ -47,6 +47,27 @@ then echo "Starting restoring $_file" ${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.common.persistence.ResourceTool upload $_file +elif [ "$1" == "list" ] +then + +_file=$2 +echo "Starting list $_file" +${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.common.persistence.ResourceTool list $_file + +elif [ "$1" == "remove" ] +then + +_file=$2 +echo "Starting remove $_file" +${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.common.persistence.ResourceTool remove $_file + +elif [ "$1" == "cat" ] +then + +_file=$2 +echo "Starting cat $_file" +${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.common.persistence.ResourceTool cat $_file + elif [ "$1" == "reset" ] then @@ -61,6 +82,9 @@ else echo "usage: metastore.sh backup" echo " metastore.sh reset" echo " metastore.sh restore PATH_TO_LOCAL_META" +echo " metastore.sh list RESOURCE_PATH" +echo " metastore.sh cat RESOURCE_PATH" +echo " metastore.sh remove RESOURCE_PATH" echo " metastore.sh clean [--delete true]" exit 1 fi http://git-wip-us.apache.org/repos/asf/kylin/blob/17c33dc4/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java -- diff --git a/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java b/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java index 489e45a..2e1d527 100644 --- a/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java +++ b/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java @@ -41,6 +41,9 @@ public class ResourceTool { System.out.println("Usage: ResourceTool list RESOURCE_PATH"); System.out.println("Usage: ResourceTool download LOCAL_DIR"); System.out.println("Usage: ResourceTool uploadLOCAL_DIR"); +System.out.println("Usage: ResourceTool reset"); +System.out.println("Usage: ResourceTool remove RESOURCE_PATH"); +System.out.println("Usage: ResourceTool cat RESOURCE_PATH"); return; }
[47/50] [abbrv] kylin git commit: [maven-release-plugin] prepare release kylin-1.5.0
[maven-release-plugin] prepare release kylin-1.5.0 Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/64d02018 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/64d02018 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/64d02018 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 64d02018fcf082745d4104d604646058fcb7e17c Parents: 4e5a936 Author: Yang LiAuthored: Sat Mar 12 12:54:25 2016 +0800 Committer: Yang Li Committed: Sat Mar 12 12:54:25 2016 +0800 -- assembly/pom.xml | 6 ++ atopcalcite/pom.xml | 2 +- core-common/pom.xml | 5 ++--- core-cube/pom.xml| 2 +- core-dictionary/pom.xml | 2 +- core-job/pom.xml | 2 +- core-metadata/pom.xml| 2 +- core-storage/pom.xml | 2 +- engine-mr/pom.xml| 2 +- engine-spark/pom.xml | 6 ++ engine-streaming/pom.xml | 6 ++ invertedindex/pom.xml| 2 +- jdbc/pom.xml | 5 ++--- kylin-it/pom.xml | 16 +++- pom.xml | 7 +++ query/pom.xml| 5 ++--- server/pom.xml | 5 ++--- source-hive/pom.xml | 2 +- source-kafka/pom.xml | 6 ++ storage-hbase/pom.xml| 8 +++- 20 files changed, 38 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/64d02018/assembly/pom.xml -- diff --git a/assembly/pom.xml b/assembly/pom.xml index 16b647e..20f02a0 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -17,13 +17,11 @@ limitations under the License. --> -http://maven.apache.org/POM/4.0.0; - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> kylin org.apache.kylin -1.5.0-SNAPSHOT +1.5.0 4.0.0 http://git-wip-us.apache.org/repos/asf/kylin/blob/64d02018/atopcalcite/pom.xml -- diff --git a/atopcalcite/pom.xml b/atopcalcite/pom.xml index 93f52b7..6ca1eae 100644 --- a/atopcalcite/pom.xml +++ b/atopcalcite/pom.xml @@ -27,7 +27,7 @@ org.apache.kylin kylin -1.5.0-SNAPSHOT +1.5.0 http://git-wip-us.apache.org/repos/asf/kylin/blob/64d02018/core-common/pom.xml -- diff --git a/core-common/pom.xml b/core-common/pom.xml index 133b6ff..776ba76 100644 --- a/core-common/pom.xml +++ b/core-common/pom.xml @@ -17,8 +17,7 @@ limitations under the License. --> -http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> 4.0.0 kylin-core-common @@ -28,7 +27,7 @@ org.apache.kylin kylin -1.5.0-SNAPSHOT +1.5.0 http://git-wip-us.apache.org/repos/asf/kylin/blob/64d02018/core-cube/pom.xml -- diff --git a/core-cube/pom.xml b/core-cube/pom.xml index 9fde78a..97af425 100644 --- a/core-cube/pom.xml +++ b/core-cube/pom.xml @@ -27,7 +27,7 @@ org.apache.kylin kylin -1.5.0-SNAPSHOT +1.5.0 http://git-wip-us.apache.org/repos/asf/kylin/blob/64d02018/core-dictionary/pom.xml -- diff --git a/core-dictionary/pom.xml b/core-dictionary/pom.xml index 9718b67..d518ecf 100644 --- a/core-dictionary/pom.xml +++ b/core-dictionary/pom.xml @@ -27,7 +27,7 @@ org.apache.kylin kylin -1.5.0-SNAPSHOT +1.5.0 http://git-wip-us.apache.org/repos/asf/kylin/blob/64d02018/core-job/pom.xml -- diff --git a/core-job/pom.xml b/core-job/pom.xml index ffe09b0..a17418c 100644 --- a/core-job/pom.xml +++ b/core-job/pom.xml @@ -27,7 +27,7 @@ org.apache.kylin kylin -1.5.0-SNAPSHOT +1.5.0 http://git-wip-us.apache.org/repos/asf/kylin/blob/64d02018/core-metadata/pom.xml --
[27/50] [abbrv] kylin git commit: test case for ssb
test case for ssb Signed-off-by: Hongbin MaProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/8590b2d2 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/8590b2d2 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/8590b2d2 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 8590b2d24f00c5495d0dd6608743ba2bfe431d83 Parents: b7db093 Author: shaofengshi Authored: Thu Mar 10 17:43:41 2016 +0800 Committer: Hongbin Ma Committed: Thu Mar 10 19:47:02 2016 +0800 -- .../cube/inmemcubing/InMemCubeBuilderTest.java | 12 +- examples/test_case_data/localmeta/cube/ssb.json | 16 ++ .../test_case_data/localmeta/cube_desc/ssb.json | 177 +++ ...ediate_ssb_1992010100_1992020100.csv | 100 +++ .../localmeta/model_desc/ssb.json | 65 +++ .../localmeta/table/SSB.CUSTOMER.json | 41 + .../localmeta/table/SSB.DATES.json | 77 .../localmeta/table/SSB.PART.json | 45 + .../localmeta/table/SSB.SUPPLIER.json | 37 .../localmeta/table/SSB.V_LINEORDER.json| 85 + 10 files changed, 650 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/8590b2d2/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilderTest.java -- diff --git a/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilderTest.java b/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilderTest.java index b593e48..76674d3 100644 --- a/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilderTest.java +++ b/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilderTest.java @@ -61,8 +61,8 @@ public class InMemCubeBuilderTest extends LocalFileMetadataTestCase { private static final Logger logger = LoggerFactory.getLogger(InMemCubeBuilderTest.class); -private static final int INPUT_ROWS = 7; -private static final int THREADS = 4; +private static final int INPUT_ROWS = 1000; +private static final int THREADS = 1; private static CubeInstance cube; private static String flatTable; @@ -75,8 +75,8 @@ public class InMemCubeBuilderTest extends LocalFileMetadataTestCase { KylinConfig kylinConfig = KylinConfig.getInstanceFromEnv(); CubeManager cubeManager = CubeManager.getInstance(kylinConfig); -cube = cubeManager.getCube("test_kylin_cube_without_slr_left_join_empty"); -flatTable = "../examples/test_case_data/localmeta/data/flatten_data_for_without_slr_left_join.csv"; +cube = cubeManager.getCube("ssb"); +flatTable = "../examples/test_case_data/localmeta/data/kylin_intermediate_ssb_1992010100_1992020100.csv"; dictionaryMap = getDictionaryMap(cube, flatTable); } @@ -213,7 +213,9 @@ public class InMemCubeBuilderTest extends LocalFileMetadataTestCase { List lines = FileUtils.readLines(new File(flatTable), "UTF-8"); for (String line : lines) { String[] row = line.trim().split(","); -assert row.length == nColumns; +if ( row.length != nColumns) { +throw new IllegalStateException(); +} if (row[c] != null) { result.add(Bytes.toBytes(row[c])); } http://git-wip-us.apache.org/repos/asf/kylin/blob/8590b2d2/examples/test_case_data/localmeta/cube/ssb.json -- diff --git a/examples/test_case_data/localmeta/cube/ssb.json b/examples/test_case_data/localmeta/cube/ssb.json new file mode 100644 index 000..879754e --- /dev/null +++ b/examples/test_case_data/localmeta/cube/ssb.json @@ -0,0 +1,16 @@ +{ + "uuid" : "70a9f288-3c01-4745-a04b-5641e82d6c69", + "version" : "2.1", + "name" : "ssb", + "owner" : "ADMIN", + "cost" : 50, + "status" : "DISABLED", + "segments" : [ { + } ], + "last_modified" : 1457534216410, + "descriptor" : "ssb", + "create_time_utc" : 1457444500888, + "size_kb" : 0, + "input_records_count" : 0, + "input_records_size" : 0 +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/8590b2d2/examples/test_case_data/localmeta/cube_desc/ssb.json -- diff --git a/examples/test_case_data/localmeta/cube_desc/ssb.json b/examples/test_case_data/localmeta/cube_desc/ssb.json new file mode 100644 index 000..7fa0e9a --- /dev/null +++ b/examples/test_case_data/localmeta/cube_desc/ssb.json @@ -0,0 +1,177 @@ +{ + "uuid" : "5c44df30-daec-486e-af90-927bf7851057", + "version" :
[03/50] [abbrv] kylin git commit: minor, UI fix kylin properties format
minor, UI fix kylin properties format Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/8a3e0e0e Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/8a3e0e0e Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/8a3e0e0e Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 8a3e0e0e869fd4ec52a847fa360ec3d3c3e5a5bf Parents: daeaf08 Author: JasonAuthored: Fri Mar 4 10:57:46 2016 +0800 Committer: Jason Committed: Fri Mar 4 10:58:24 2016 +0800 -- examples/test_case_data/sandbox/kylin.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/8a3e0e0e/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 7c9919b..04681af 100644 --- a/examples/test_case_data/sandbox/kylin.properties +++ b/examples/test_case_data/sandbox/kylin.properties @@ -116,5 +116,5 @@ kylin.web.contact_mail= #env DEV|QA|PROD deploy.env=DEV - kylin.web.hive.limit=20 +kylin.web.hive.limit=20
[08/50] [abbrv] kylin git commit: very minor, eclipse settings update
very minor, eclipse settings update Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/11dc04b6 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/11dc04b6 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/11dc04b6 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: 11dc04b6117c9a146dc54f919cee0354ceac1e24 Parents: ecd1266 Author: Yang LiAuthored: Sat Mar 5 08:05:37 2016 +0800 Committer: Yang Li Committed: Sat Mar 5 08:05:37 2016 +0800 -- core-cube/.settings/org.eclipse.core.resources.prefs | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/11dc04b6/core-cube/.settings/org.eclipse.core.resources.prefs -- diff --git a/core-cube/.settings/org.eclipse.core.resources.prefs b/core-cube/.settings/org.eclipse.core.resources.prefs index 04cfa2c..365bbd6 100644 --- a/core-cube/.settings/org.eclipse.core.resources.prefs +++ b/core-cube/.settings/org.eclipse.core.resources.prefs @@ -2,5 +2,4 @@ eclipse.preferences.version=1 encoding//src/main/java=UTF-8 encoding//src/main/resources=UTF-8 encoding//src/test/java=UTF-8 -encoding//src/test/resources=UTF-8 encoding/=UTF-8
[39/50] [abbrv] kylin git commit: KYLIN-1286 fix java license files
KYLIN-1286 fix java license files Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/d0e096a7 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/d0e096a7 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/d0e096a7 Branch: refs/heads/1.5.x-HBase1.1.3 Commit: d0e096a77f13e235fec5ee576e1f99169cb74fce Parents: aa49ece Author: Li YangAuthored: Fri Mar 11 16:04:33 2016 +0800 Committer: Li Yang Committed: Fri Mar 11 16:04:33 2016 +0800 -- .../kylin/common/persistence/RawResource.java | 18 +++ .../kylin/common/util/Log4jConfigurer.java | 18 +++ .../org/apache/kylin/common/util/RangeUtil.java | 18 +++ .../org/apache/kylin/common/util/SortUtil.java | 18 +++ .../kylin/common/util/StreamingMessage.java | 18 +++ .../org/apache/kylin/common/util/TimeUtil.java | 18 +++ .../kylin/common/util/ITMockHTableTest.java | 158 --- .../kylin/common/util/IdentityUtilTest.java | 18 +++ .../org/apache/kylin/common/util/RangeTest.java | 18 +++ .../apache/kylin/common/util/RangeUtilTest.java | 18 +++ .../apache/kylin/common/util/TimeUtilTest.java | 18 +++ .../org/apache/kylin/dict/DictCodeSystem.java | 18 +++ .../apache/kylin/dict/DictionarySerializer.java | 18 +++ .../dict/DistinctColumnValuesProvider.java | 18 +++ .../apache/kylin/dict/TimeStrDictionary.java| 18 +++ .../apache/kylin/dict/lookup/SnapshotCLI.java | 18 +++ .../kylin/dict/TimeStrDictionaryTests.java | 18 +++ .../kylin/measure/bitmap/BitmapMeasureType.java | 18 +++ .../metadata/datatype/DateTimeSerializer.java | 18 +++ .../metadata/datatype/StringSerializer.java | 18 +++ .../realization/IRealizationSegment.java| 18 +++ .../metadata/realization/SQLDigestUtil.java | 18 +++ .../metadata/realization/StreamSQLDigest.java | 18 +++ .../metadata/tuple/CompoundTupleIterator.java | 18 +++ .../kylin/metadata/tuple/IEvaluatableTuple.java | 18 +++ .../metadata/tuple/SimpleTupleIterator.java | 18 +++ .../kylin/metadata/tuple/TeeTupleIterator.java | 18 +++ .../metadata/tuple/TeeTupleItrListener.java | 18 +++ .../topn/TopNCounterSerializerTest.java | 18 +++ .../datatype/BigDecimalSerializerTest.java | 18 +++ 30 files changed, 522 insertions(+), 158 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/d0e096a7/core-common/src/main/java/org/apache/kylin/common/persistence/RawResource.java -- diff --git a/core-common/src/main/java/org/apache/kylin/common/persistence/RawResource.java b/core-common/src/main/java/org/apache/kylin/common/persistence/RawResource.java index c0b5b21..6c155a2 100644 --- a/core-common/src/main/java/org/apache/kylin/common/persistence/RawResource.java +++ b/core-common/src/main/java/org/apache/kylin/common/persistence/RawResource.java @@ -1,3 +1,21 @@ +/* + * 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.persistence; import java.io.InputStream; http://git-wip-us.apache.org/repos/asf/kylin/blob/d0e096a7/core-common/src/main/java/org/apache/kylin/common/util/Log4jConfigurer.java -- diff --git a/core-common/src/main/java/org/apache/kylin/common/util/Log4jConfigurer.java b/core-common/src/main/java/org/apache/kylin/common/util/Log4jConfigurer.java index 6f887b7..a8540af 100644 --- a/core-common/src/main/java/org/apache/kylin/common/util/Log4jConfigurer.java +++ b/core-common/src/main/java/org/apache/kylin/common/util/Log4jConfigurer.java @@ -1,3 +1,21 @@ +/* + * 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
[26/50] [abbrv] kylin git commit: bug fix, new aggr group does not support hierarchy well
bug fix, new aggr group does not support hierarchy well Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/b7db093f Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/b7db093f Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/b7db093f Branch: refs/heads/1.5.x-HBase1.1.3 Commit: b7db093fbefd9fac1e2193e8e06ce64db2bd0ce0 Parents: 4e48f2a Author: lidongsjtuAuthored: Thu Mar 10 18:58:21 2016 +0800 Committer: lidongsjtu Committed: Thu Mar 10 18:58:37 2016 +0800 -- .../java/org/apache/kylin/cube/cuboid/Cuboid.java| 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/b7db093f/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java -- diff --git a/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java b/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java index 2cd96a6..c4e373b 100644 --- a/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java +++ b/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java @@ -143,9 +143,18 @@ public class Cuboid implements Comparable { long fullMask = hierarchyMask.fullMask; long intersect = cuboidID & fullMask; if (intersect != 0 && intersect != fullMask) { -long lsb = Long.lowestOneBit(intersect); -long fillMask = fullMask & ~(lsb - 1); -cuboidID |= fillMask; + +boolean startToFill = false; +for (int i = hierarchyMask.dims.length - 1; i >= 0; i--) { +if (startToFill) { +cuboidID |= hierarchyMask.dims[i]; +} else { +if ((cuboidID & hierarchyMask.dims[i]) != 0) { +startToFill = true; +cuboidID |= hierarchyMask.dims[i]; +} +} +} } }
[20/50] [abbrv] kylin git commit: KYLIN-1343 Upgrade to calcite 1.6 (with Edward Zhang)
http://git-wip-us.apache.org/repos/asf/kylin/blob/f73abf6c/atopcalcite/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java -- diff --git a/atopcalcite/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java b/atopcalcite/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java index c184f0b..aed7c27 100644 --- a/atopcalcite/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java +++ b/atopcalcite/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java @@ -18,6 +18,7 @@ package org.apache.calcite.sql2rel; +import org.apache.calcite.avatica.util.Spaces; import org.apache.calcite.linq4j.Ord; import org.apache.calcite.plan.Convention; import org.apache.calcite.plan.RelOptCluster; @@ -25,26 +26,32 @@ import org.apache.calcite.plan.RelOptPlanner; import org.apache.calcite.plan.RelOptSamplingParameters; import org.apache.calcite.plan.RelOptTable; import org.apache.calcite.plan.RelOptUtil; +import org.apache.calcite.plan.RelTraitSet; import org.apache.calcite.prepare.Prepare; import org.apache.calcite.prepare.RelOptTableImpl; import org.apache.calcite.rel.RelCollation; +import org.apache.calcite.rel.RelCollationTraitDef; import org.apache.calcite.rel.RelCollations; import org.apache.calcite.rel.RelFieldCollation; import org.apache.calcite.rel.RelNode; -import org.apache.calcite.rel.RelShuttle; +import org.apache.calcite.rel.RelRoot; +import org.apache.calcite.rel.SingleRel; import org.apache.calcite.rel.core.Aggregate; import org.apache.calcite.rel.core.AggregateCall; import org.apache.calcite.rel.core.Collect; import org.apache.calcite.rel.core.CorrelationId; +import org.apache.calcite.rel.core.Filter; import org.apache.calcite.rel.core.Join; import org.apache.calcite.rel.core.JoinInfo; import org.apache.calcite.rel.core.JoinRelType; import org.apache.calcite.rel.core.Project; import org.apache.calcite.rel.core.RelFactories; import org.apache.calcite.rel.core.Sample; +import org.apache.calcite.rel.core.Sort; import org.apache.calcite.rel.core.Uncollect; import org.apache.calcite.rel.logical.LogicalAggregate; import org.apache.calcite.rel.logical.LogicalCorrelate; +import org.apache.calcite.rel.logical.LogicalFilter; import org.apache.calcite.rel.logical.LogicalIntersect; import org.apache.calcite.rel.logical.LogicalJoin; import org.apache.calcite.rel.logical.LogicalMinus; @@ -56,6 +63,7 @@ import org.apache.calcite.rel.logical.LogicalTableScan; import org.apache.calcite.rel.logical.LogicalUnion; import org.apache.calcite.rel.logical.LogicalValues; import org.apache.calcite.rel.metadata.RelColumnMapping; +import org.apache.calcite.rel.stream.Delta; import org.apache.calcite.rel.stream.LogicalDelta; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeFactory; @@ -72,8 +80,8 @@ import org.apache.calcite.rex.RexLiteral; import org.apache.calcite.rex.RexNode; import org.apache.calcite.rex.RexRangeRef; import org.apache.calcite.rex.RexShuttle; +import org.apache.calcite.rex.RexSubQuery; import org.apache.calcite.rex.RexUtil; -import org.apache.calcite.rex.RexVisitorImpl; import org.apache.calcite.rex.RexWindowBound; import org.apache.calcite.schema.ModifiableTable; import org.apache.calcite.schema.ModifiableView; @@ -85,6 +93,7 @@ import org.apache.calcite.sql.SemiJoinType; import org.apache.calcite.sql.SqlAggFunction; import org.apache.calcite.sql.SqlBasicCall; import org.apache.calcite.sql.SqlCall; +import org.apache.calcite.sql.SqlCallBinding; import org.apache.calcite.sql.SqlDataTypeSpec; import org.apache.calcite.sql.SqlDelete; import org.apache.calcite.sql.SqlDynamicParam; @@ -102,10 +111,12 @@ import org.apache.calcite.sql.SqlNodeList; import org.apache.calcite.sql.SqlNumericLiteral; import org.apache.calcite.sql.SqlOperator; import org.apache.calcite.sql.SqlOperatorTable; +import org.apache.calcite.sql.SqlOrderBy; import org.apache.calcite.sql.SqlSampleSpec; import org.apache.calcite.sql.SqlSelect; import org.apache.calcite.sql.SqlSelectKeyword; import org.apache.calcite.sql.SqlSetOperator; +import org.apache.calcite.sql.SqlUnnestOperator; import org.apache.calcite.sql.SqlUpdate; import org.apache.calcite.sql.SqlUtil; import org.apache.calcite.sql.SqlValuesOperator; @@ -138,8 +149,10 @@ import org.apache.calcite.sql.validate.SqlValidatorImpl; import org.apache.calcite.sql.validate.SqlValidatorNamespace; import org.apache.calcite.sql.validate.SqlValidatorScope; import org.apache.calcite.sql.validate.SqlValidatorUtil; +import org.apache.calcite.tools.RelBuilder; import org.apache.calcite.util.ImmutableBitSet; import org.apache.calcite.util.ImmutableIntList; +import org.apache.calcite.util.Litmus; import org.apache.calcite.util.NlsString; import org.apache.calcite.util.NumberUtil; import org.apache.calcite.util.Pair; @@ -158,15 +171,16 @@ import com.google.common.collect.Sets; import
[45/50] [abbrv] kylin git commit: minor, add seller_id as dimension in data model
minor, add seller_id as dimension in data model Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/3ed7f6c0 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/3ed7f6c0 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/3ed7f6c0 Branch: refs/heads/master Commit: 3ed7f6c0020175b956514df6469fec3d6f4c871b Parents: 0eea651 Author: lidongsjtuAuthored: Tue Mar 22 15:30:32 2016 +0800 Committer: lidongsjtu Committed: Tue Mar 22 15:30:41 2016 +0800 -- examples/sample_cube/metadata/model_desc/kylin_sales_model.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/3ed7f6c0/examples/sample_cube/metadata/model_desc/kylin_sales_model.json -- diff --git a/examples/sample_cube/metadata/model_desc/kylin_sales_model.json b/examples/sample_cube/metadata/model_desc/kylin_sales_model.json index 4cf3c27..036d2af 100644 --- a/examples/sample_cube/metadata/model_desc/kylin_sales_model.json +++ b/examples/sample_cube/metadata/model_desc/kylin_sales_model.json @@ -1,6 +1,6 @@ { "uuid" : "0928468a-9fab-4185-9a14-6f2e7c74823f", - + "name" : "kylin_sales_model", "lookups" : [ { "table" : "DEFAULT.KYLIN_CAL_DT", @@ -28,7 +28,7 @@ "columns" : [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] }, { "table" : "DEFAULT.KYLIN_SALES", -"columns" : [ "LSTG_FORMAT_NAME" ] +"columns" : [ "LSTG_FORMAT_NAME", "SELLER_ID" ] } ], "metrics": [ "PRICE",
[33/50] [abbrv] kylin git commit: Compress with tools dir.
Compress with tools dir. Signed-off-by: Hongbin MaProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/b31c4cac Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/b31c4cac Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/b31c4cac Branch: refs/heads/KYLIN-1122-B1 Commit: b31c4cac8fb2c6994f6135e01273a7139c749733 Parents: 8d1b194 Author: nichunen Authored: Fri Mar 18 17:56:21 2016 +0800 Committer: Xiaoyu Wang Committed: Mon Mar 21 19:57:35 2016 +0800 -- script/compress.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/b31c4cac/script/compress.sh -- diff --git a/script/compress.sh b/script/compress.sh index 96044a6..f309799 100755 --- a/script/compress.sh +++ b/script/compress.sh @@ -33,7 +33,7 @@ package_name=apache-kylin-${version}-bin rm -rf dist/${package_name} mkdir dist/${package_name} # copy files -cp -r lib bin conf dist/tomcat examples/sample_cube dist/commit.sha1 dist/${package_name} +cp -r lib bin conf tools dist/tomcat examples/sample_cube dist/commit.sha1 dist/${package_name} # copy license files cp LICENSE README.md NOTICE dist/${package_name}
[36/50] [abbrv] kylin git commit: update hbase-export.tar.gz after add raw measures in cube desc
update hbase-export.tar.gz after add raw measures in cube desc Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/bbdf1d06 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/bbdf1d06 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/bbdf1d06 Branch: refs/heads/1.3.x Commit: bbdf1d062f98656f556d66ff2eab3f224ca00eed Parents: 955b657 Author: wangxiaoyuAuthored: Wed Mar 9 22:02:35 2016 +0800 Committer: Xiaoyu Wang Committed: Mon Mar 21 20:01:04 2016 +0800 -- .../minicluster/hbase-export.tar.gz | Bin 29527690 -> 29746922 bytes 1 file changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/bbdf1d06/examples/test_case_data/minicluster/hbase-export.tar.gz -- diff --git a/examples/test_case_data/minicluster/hbase-export.tar.gz b/examples/test_case_data/minicluster/hbase-export.tar.gz index fa06943..f9bd01b 100755 Binary files a/examples/test_case_data/minicluster/hbase-export.tar.gz and b/examples/test_case_data/minicluster/hbase-export.tar.gz differ
[50/50] [abbrv] kylin git commit: minor, remove mvn-adamgent repository from server pom
minor, remove mvn-adamgent repository from server pom Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/2dd49eb0 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/2dd49eb0 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/2dd49eb0 Branch: refs/heads/master Commit: 2dd49eb0790606705e95735a985bfc728c3218f4 Parents: 35c3e0f Author: lidongsjtuAuthored: Wed Mar 23 13:34:50 2016 +0800 Committer: lidongsjtu Committed: Wed Mar 23 13:34:50 2016 +0800 -- server/pom.xml | 5 - 1 file changed, 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/2dd49eb0/server/pom.xml -- diff --git a/server/pom.xml b/server/pom.xml index 93c4a30..b804933 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -496,11 +496,6 @@ true - -mvn-adamgent -http://mvn-adamgent.googlecode.com/svn/maven/release -Adam Gent Maven Repository -
[19/50] [abbrv] kylin git commit: KYLIN-1505 Combine guava filters with Predicates.and
KYLIN-1505 Combine guava filters with Predicates.and Signed-off-by: Yang LiProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/6d368cda Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/6d368cda Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/6d368cda Branch: refs/heads/master Commit: 6d368cda47147b0dd04e87cbcada9218687f9dab Parents: fb694a6 Author: Hao Chen Authored: Sun Mar 20 15:50:26 2016 +0800 Committer: Yang Li Committed: Sun Mar 20 15:50:26 2016 +0800 -- .../apache/kylin/rest/service/BasicService.java | 7 +++-- .../apache/kylin/rest/service/JobService.java | 29 +--- 2 files changed, 17 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/6d368cda/server/src/main/java/org/apache/kylin/rest/service/BasicService.java -- diff --git a/server/src/main/java/org/apache/kylin/rest/service/BasicService.java b/server/src/main/java/org/apache/kylin/rest/service/BasicService.java index 5fea710..7696c59 100644 --- a/server/src/main/java/org/apache/kylin/rest/service/BasicService.java +++ b/server/src/main/java/org/apache/kylin/rest/service/BasicService.java @@ -45,6 +45,7 @@ import org.apache.kylin.storage.hybrid.HybridManager; import com.google.common.base.Function; import com.google.common.base.Predicate; +import com.google.common.base.Predicates; import com.google.common.collect.FluentIterable; import com.google.common.collect.Lists; @@ -122,7 +123,7 @@ public abstract class BasicService { public CubingJob apply(AbstractExecutable executable) { return (CubingJob) executable; } -}).filter(new Predicate() { +}).filter(Predicates.and(new Predicate() { @Override public boolean apply(CubingJob executable) { if (null == projectName || null == getProjectManager().getProject(projectName)) { @@ -132,12 +133,12 @@ public abstract class BasicService { return project.containsRealization(RealizationType.CUBE, CubingExecutableUtil.getCubeName(executable.getParams())); } } -}).filter(new Predicate() { +}, new Predicate() { @Override public boolean apply(CubingJob executable) { return statusList.contains(allOutputs.get(executable.getId()).getState()); } -})); +}))); return results; } http://git-wip-us.apache.org/repos/asf/kylin/blob/6d368cda/server/src/main/java/org/apache/kylin/rest/service/JobService.java -- diff --git a/server/src/main/java/org/apache/kylin/rest/service/JobService.java b/server/src/main/java/org/apache/kylin/rest/service/JobService.java index d0c29a4..1a35d0d 100644 --- a/server/src/main/java/org/apache/kylin/rest/service/JobService.java +++ b/server/src/main/java/org/apache/kylin/rest/service/JobService.java @@ -122,15 +122,7 @@ public class JobService extends BasicService { } private List listCubeJobInstance(final String cubeName, final String projectName, List statusList, final long timeStartInMillis, final long timeEndInMillis) { -Set states; -if (statusList == null || statusList.isEmpty()) { -states = EnumSet.allOf(ExecutableState.class); -} else { -states = Sets.newHashSet(); -for (JobStatusEnum status : statusList) { -states.add(parseToExecutableState(status)); -} -} +Set states = convertStatusEnumToStates(statusList); final Map allOutputs = getExecutableManager().getAllOutputs(timeStartInMillis, timeEndInMillis); return Lists.newArrayList(FluentIterable.from(listAllCubingJobs(cubeName, projectName, states, timeStartInMillis, timeEndInMillis, allOutputs)).transform(new Function () { @Override @@ -141,6 +133,17 @@ public class JobService extends BasicService { } private List listCubeJobInstance(final String cubeName, final String projectName, List statusList) { +Set states = convertStatusEnumToStates(statusList); +final Map allOutputs = getExecutableManager().getAllOutputs(); +return Lists.newArrayList(FluentIterable.from(listAllCubingJobs(cubeName, projectName, states, allOutputs)).transform(new Function () { +@Override +public JobInstance apply(CubingJob cubingJob) { +return parseToJobInstance(cubingJob, allOutputs); +} +})); +} + +
[09/50] [abbrv] kylin git commit: KYLIN-1249 A client library to help automatic cube
KYLIN-1249 A client library to help automatic cube Signed-off-by: Hongbin MaProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/bb83cbeb Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/bb83cbeb Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/bb83cbeb Branch: refs/heads/1.3.x Commit: bb83cbeb0e6a3ce2fda7902069ff71518ae4a10a Parents: c246d82 Author: huang...@mininglamp.com Authored: Wed Feb 24 23:17:56 2016 +0800 Committer: Hongbin Ma Committed: Thu Mar 17 18:12:56 2016 +0800 -- tools/kylin_client_tool/client/__init__.py | 2 + .../client/client_interface.py | 226 ++ tools/kylin_client_tool/client/client_parse.py | 96 ++ tools/kylin_client_tool/cube_def.csv| 2 + tools/kylin_client_tool/cube_names.csv | 2 + tools/kylin_client_tool/jobs/__init__.py| 2 + tools/kylin_client_tool/jobs/admin.py | 66 tools/kylin_client_tool/jobs/build.py | 76 + tools/kylin_client_tool/jobs/cube.py| 187 +++ tools/kylin_client_tool/kylin_client_tool.py| 5 + tools/kylin_client_tool/models/__init__.py | 2 + tools/kylin_client_tool/models/cube.py | 309 +++ tools/kylin_client_tool/models/dimension.py | 83 + tools/kylin_client_tool/models/hbase.py | 100 ++ tools/kylin_client_tool/models/io/__init__.py | 2 + tools/kylin_client_tool/models/io/base.py | 65 tools/kylin_client_tool/models/io/cube.py | 90 ++ tools/kylin_client_tool/models/io/dimension.py | 55 tools/kylin_client_tool/models/io/measure.py| 56 tools/kylin_client_tool/models/io/readers.py| 96 ++ tools/kylin_client_tool/models/job.py | 119 +++ tools/kylin_client_tool/models/measure.py | 38 +++ tools/kylin_client_tool/models/object.py| 12 + tools/kylin_client_tool/models/request.py | 187 +++ tools/kylin_client_tool/models/rowkey.py| 79 + tools/kylin_client_tool/rest/__init__.py| 2 + tools/kylin_client_tool/rest/apis.py| 102 ++ tools/kylin_client_tool/scheduler/__init__.py | 2 + .../scheduler/workers/__init__.py | 2 + .../kylin_client_tool/scheduler/workers/cube.py | 122 tools/kylin_client_tool/settings/__init__.py| 2 + tools/kylin_client_tool/settings/settings.py| 15 + tools/kylin_client_tool/setup-mac.sh| 20 ++ tools/kylin_client_tool/setup.sh| 20 ++ 34 files changed, 2244 insertions(+) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/bb83cbeb/tools/kylin_client_tool/client/__init__.py -- diff --git a/tools/kylin_client_tool/client/__init__.py b/tools/kylin_client_tool/client/__init__.py new file mode 100644 index 000..c942174 --- /dev/null +++ b/tools/kylin_client_tool/client/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +__author__ = 'Ni Chunen' http://git-wip-us.apache.org/repos/asf/kylin/blob/bb83cbeb/tools/kylin_client_tool/client/client_interface.py -- diff --git a/tools/kylin_client_tool/client/client_interface.py b/tools/kylin_client_tool/client/client_interface.py new file mode 100644 index 000..ceb6095 --- /dev/null +++ b/tools/kylin_client_tool/client/client_interface.py @@ -0,0 +1,226 @@ +# -*- coding: utf-8 -*- +__author__ = 'Ni Chunen' +import time +import datetime + +from apscheduler.schedulers.background import BackgroundScheduler + +from apscheduler.schedulers.blocking import BlockingScheduler + +from scheduler.workers.cube import CubeWorker +from jobs.cube import CubeJob +from models.io.readers import CSVReader +from jobs.build import CubeBuildJob + + +class ClientJob: +@staticmethod +def build(cube_name_list, endtime=None): +run_cube_job_id = '1' +check_cube_job_id = '2' +scheduler = BackgroundScheduler() +CubeWorker.job_instance_dict = {} + +for cube_name in cube_name_list: +CubeWorker.job_instance_dict[cube_name] = None + +CubeWorker.scheduler = scheduler +CubeWorker.run_cube_job_id = run_cube_job_id +CubeWorker.check_cube_job_id = check_cube_job_id +# start the run cube job immediately +CubeWorker.run_cube_job(endtime) + +scheduler.add_job(CubeWorker.run_cube_job, 'interval', seconds=30, id=run_cube_job_id, args=[endtime]) +scheduler.add_job(CubeWorker.check_cube_job, 'interval', seconds=30, id=check_cube_job_id) +scheduler.start() + +while True: +if
[21/50] [abbrv] kylin git commit: KYLIN-1122 fixed SQLDigest.isRawQuery derive logic
KYLIN-1122 fixed SQLDigest.isRawQuery derive logic Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/41bb1eea Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/41bb1eea Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/41bb1eea Branch: refs/heads/KYLIN-1122-B2 Commit: 41bb1eea69aed9def03f02d67806269da357c382 Parents: e7cd596 Author: wangxiaoyuAuthored: Sun Mar 20 19:20:08 2016 +0800 Committer: wangxiaoyu Committed: Sun Mar 20 19:20:08 2016 +0800 -- .../java/org/apache/kylin/measure/raw/RawMeasureType.java | 4 ++-- .../java/org/apache/kylin/metadata/realization/SQLDigest.java | 7 ++- .../model_desc/test_kylin_inner_join_model_desc.json | 3 --- .../localmeta/model_desc/test_kylin_left_join_model_desc.json | 3 --- .../org/apache/kylin/query/enumerator/OLAPEnumerator.java | 1 - 5 files changed, 8 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/41bb1eea/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java -- diff --git a/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java b/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java index 4ba1f3e..93fbce3 100644 --- a/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java +++ b/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java @@ -161,7 +161,7 @@ public class RawMeasureType extends MeasureType { public CapabilityResult.CapabilityInfluence influenceCapabilityCheck(Collection unmatchedDimensions, Collection unmatchedAggregations, SQLDigest digest, MeasureDesc measureDesc) { //is raw query -if (digest.aggregations.size() != 0 || digest.metricColumns.size() != 0) +if (!digest.isRawQuery()) return null; TblColRef rawColumn = getRawColumn(measureDesc.getFunction()); @@ -192,7 +192,7 @@ public class RawMeasureType extends MeasureType
{ @Override public void adjustSqlDigest(MeasureDesc measureDesc, SQLDigest sqlDigest) { -if (sqlDigest.isRawQuery) { +if (sqlDigest.isRawQuery()) { TblColRef col = this.getRawColumn(measureDesc.getFunction()); ParameterDesc colParameter = new ParameterDesc(); colParameter.setType("column"); http://git-wip-us.apache.org/repos/asf/kylin/blob/41bb1eea/core-metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java -- diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java b/core-metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java index dbb1ce3..08bfc8c 100644 --- a/core-metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java +++ b/core-metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java @@ -45,7 +45,7 @@ public class SQLDigest { public Collection aggregations; public Collection sortMeasures; public Collection sortOrders; -public boolean isRawQuery = false; +private boolean isRawQuery = false; public SQLDigest(String factTable, TupleFilter filter, Collection joinDescs, Collection allColumns, // Collection groupbyColumns, Collection filterColumns, Collection aggregatedColumns, Collection aggregateFunnc, Collection sortMeasures, Collection sortOrders) { @@ -59,6 +59,11 @@ public class SQLDigest { this.aggregations = aggregateFunnc; this.sortMeasures = sortMeasures; this.sortOrders = sortOrders; +this.isRawQuery = this.groupbyColumns.isEmpty() && this.metricColumns.isEmpty(); +} + +public boolean isRawQuery() { +return isRawQuery; } @Override http://git-wip-us.apache.org/repos/asf/kylin/blob/41bb1eea/examples/test_case_data/localmeta/model_desc/test_kylin_inner_join_model_desc.json -- diff --git a/examples/test_case_data/localmeta/model_desc/test_kylin_inner_join_model_desc.json b/examples/test_case_data/localmeta/model_desc/test_kylin_inner_join_model_desc.json index d96793d..7b8aded 100644 --- a/examples/test_case_data/localmeta/model_desc/test_kylin_inner_join_model_desc.json +++ b/examples/test_case_data/localmeta/model_desc/test_kylin_inner_join_model_desc.json @@ -88,9 +88,6 @@ } ], "metrics": [ -"CAL_DT", -"LSTG_FORMAT_NAME", -"LEAF_CATEG_ID", "PRICE", "ITEM_COUNT" ],
[40/50] [abbrv] kylin git commit: KYLIN_1514 Fix MD5 validation of tomcat when package tar
KYLIN_1514 Fix MD5 validation of tomcat when package tar Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/26c6c0ab Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/26c6c0ab Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/26c6c0ab Branch: refs/heads/1.3.x Commit: 26c6c0ab9b26c18919fcbc93a82c90b554d0ef5e Parents: 03165f3 Author: lidongsjtuAuthored: Tue Mar 22 10:14:55 2016 +0800 Committer: lidongsjtu Committed: Tue Mar 22 10:14:55 2016 +0800 -- script/download-tomcat.sh | 13 + script/package.sh | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/26c6c0ab/script/download-tomcat.sh -- diff --git a/script/download-tomcat.sh b/script/download-tomcat.sh index c39a7e8..3836a16 100755 --- a/script/download-tomcat.sh +++ b/script/download-tomcat.sh @@ -22,21 +22,26 @@ cd ${dir}/.. cd dist rm -rf tomcat +alias md5cmd="md5sum" +if [[ `uname -a` =~ "Darwin" ]]; then +alias md5cmd="md5 -q" +fi + if [ ! -f "apache-tomcat-7.0.59.tar.gz" ] then echo "not binary file found" -wget http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz || echo "download tomcat failed" +wget http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz || echo "download tomcat failed" else -if [ `md5sum apache-tomcat-7.0.59.tar.gz | awk '{print $1}'` != "ec570258976edf9a833cd88fd9220909" ] +if [ `md5cmd apache-tomcat-7.0.59.tar.gz | awk '{print $1}'` != "ec570258976edf9a833cd88fd9220909" ] then echo "md5 check failed" rm apache-tomcat-7.0.59.tar.gz -wget http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz || echo "download tomcat failed" +wget http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz || echo "download tomcat failed" fi fi +unalias md5cmd tar -zxvf apache-tomcat-7.0.59.tar.gz - mv apache-tomcat-7.0.59 tomcat rm -rf tomcat/webapps/* http://git-wip-us.apache.org/repos/asf/kylin/blob/26c6c0ab/script/package.sh -- diff --git a/script/package.sh b/script/package.sh index 820dce2..a0d6eaa 100755 --- a/script/package.sh +++ b/script/package.sh @@ -49,7 +49,7 @@ fi dir=$(dirname ${0}) cd ${dir}/.. -version=`mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -E '^[0-9]+\.[0-9]+\.[0-9]+'` +version=`mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\['` echo "kylin version: ${version}" export version
[03/50] [abbrv] kylin git commit: revise upgrade document
revise upgrade document Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/3ff05a9a Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/3ff05a9a Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/3ff05a9a Branch: refs/heads/document Commit: 3ff05a9aea37921f33b8b2ba88636a475e982b29 Parents: b3116c9 Author: Hongbin MaAuthored: Thu Mar 17 17:45:10 2016 +0800 Committer: Hongbin Ma Committed: Thu Mar 17 17:45:10 2016 +0800 -- website/_docs15/howto/howto_upgrade.md | 99 ++--- 1 file changed, 62 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/3ff05a9a/website/_docs15/howto/howto_upgrade.md -- diff --git a/website/_docs15/howto/howto_upgrade.md b/website/_docs15/howto/howto_upgrade.md index 6c63d96..3723194 100644 --- a/website/_docs15/howto/howto_upgrade.md +++ b/website/_docs15/howto/howto_upgrade.md @@ -3,90 +3,115 @@ layout: docs15 title: Upgrade from old version categories: howto permalink: /docs15/howto/howto_upgrade.html -since: v1.5 +since: v1.5.1 --- -## Upgrade from v1.3 to v1.5 +## Upgrade from prior 1.5 to v1.5.1 -From v1.3 to v1.5, Kylin's cube data is backward compatible, but metadata has been refactored as new schema, to support new features on cubing and query enhancement. So if you want to deploy v1.5 on your v1.3 base, you need to upgrade the metadata as following steps: +Kylin 1.5.1 is not backward compatible in terms of metadata. (The built cubes are still functional after metadata upgrade) So if you want to deploy v1.5.x code on your prior 1.5 metadata store (in the following text we'll use v1.3.0 as example), you need to upgrade the metadata as following steps: + + 1. Backup metadata on v1.3.0 - 1. Backup metadata on v1.3 To avoid data loss during the upgrade, a backup at the very beginning is always suggested. In case of upgrade failure, you can roll back to original state with the backup. ``` +export KYLIN_HOME="" $KYLIN_HOME/bin/metastore.sh backup ``` -It will print the backup folder, take it down and make sure it will not be deleted before the upgrade finished. If there is no "metastore.sh", you can use HBase's snapshot command to do backup: + +It will print the backup folder, write it down and make sure it will not be deleted before the upgrade finished. We'll later reference this folder as BACKUP_FOLDER. + + 2. Stop Kylin v1.3.0 instance + +Before deploying Kylin v1.5.1 instance, you need to stop the old instance. Note that end users cannot access kylin service from this point. ``` -hbase shell -snapshot 'kylin_metadata', 'kylin_metadata_backup20160101' +$KYLIN_HOME/bin/kylin.sh stop ``` -Here 'kylin_metadata' is the default kylin metadata table name, replace it with the right table name of your Kylin metastore. - 2. Stop Kylin v1.3 instance -Before deploying Kylin v1.5 instance, you need to stop the old instance. Note that end users cannot access kylin service from this point. + 3. Install Kylin v1.5.1 and copy back "conf" + +Download the new Kylin v1.5.1 binary package from Kylin's download page; Extract it to a different folder other than current KYLIN_HOME; Before copy back the "conf" folder, do a compare and merge between the old and new kylin.properties to ensure newly introduced property will be kept. + + 4. Automaticly upgrade metadata + +Kylin v1.5.1 package provides a tool for metadata automaticly upgrade. In this upgrade, all cubes' metadata will be updated to v1.5.1 compatible format. The treatment of empty cubes and non-empty cubes are different though. For empty cubes, we'll upgrade the cube's storage engine and cubing engine to the latest, so that new features will be enabled for the new coming cubing jobs. But those non-empty cubes carries legacy cube segments, so we'll remain its old storage engine and cubing engine. In other word, the non-empty cubes will not enjoy the performance and storage wise gains released in 1.5.x versions. Check the last section to see how to deal with non-empty cubes. +To avoid corrupting the metadata store, metadata upgrade is performed against a copy of the local metadata backup, i.e. a copy of BACKUP_FOLDER. ``` -$KYLIN_HOME/bin/kylin.sh stop +export KYLIN_HOME="" +$KYLIN_HOME/bin/kylin.sh org.apache.kylin.cube.upgrade.entry.CubeMetadataUpgradeEntry_v_1_5_1 ``` - 3. Install Kylin v1.5 and copy back "conf" -Download the new Kylin v1.5 binary package from Kylin's download page; Extract it to a different folder other than current KYLIN_HOME; Before copy back the "conf" folder, do a compare and merge between the old and new kylin.properties to ensure newly
[30/50] [abbrv] kylin git commit: KYLIN-1122 SQLDigest.isRawQuery logic bug fixed
KYLIN-1122 SQLDigest.isRawQuery logic bug fixed Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/4960a54f Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/4960a54f Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/4960a54f Branch: refs/heads/KYLIN-1122-B1 Commit: 4960a54f4b986383a954f79a0ee3be6545c8ae9d Parents: b31c4ca Author: Xiaoyu WangAuthored: Mon Mar 21 19:55:03 2016 +0800 Committer: Xiaoyu Wang Committed: Mon Mar 21 19:57:35 2016 +0800 -- .../main/java/org/apache/kylin/metadata/realization/SQLDigest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/4960a54f/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java -- diff --git a/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java b/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java index 16e268e..8ff144f 100644 --- a/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java +++ b/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java @@ -49,7 +49,7 @@ public class SQLDigest { this.filterColumns = filterColumns; this.metricColumns = aggregatedColumns; this.aggregations = aggregateFunnc; -this.isRawQuery = this.groupbyColumns.isEmpty() && this.metricColumns.isEmpty(); +this.isRawQuery = this.groupbyColumns.isEmpty() && this.aggregations.isEmpty(); } public boolean isRawQuery() {
[12/50] [abbrv] kylin git commit: KYLIN-1492 fix CI
KYLIN-1492 fix CI Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/e088cb5d Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/e088cb5d Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/e088cb5d Branch: refs/heads/master Commit: e088cb5d1f0cf4d493d2b7dedd94edd58c277f5a Parents: d52a8ca Author: Li YangAuthored: Thu Mar 17 18:50:55 2016 +0800 Committer: Li Yang Committed: Thu Mar 17 18:51:19 2016 +0800 -- .../kylin/common/persistence/ResourceTool.java | 17 +- .../org/apache/kylin/cube/kv/CubeDimEncMap.java | 169 ++- .../rest/service/BadQueryDetectorTest.java | 15 +- 3 files changed, 114 insertions(+), 87 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/e088cb5d/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java -- diff --git a/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java b/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java index 2e1d527..b11fe1a 100644 --- a/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java +++ b/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java @@ -124,12 +124,17 @@ public class ResourceTool { // case of resource (not a folder) if (children == null) { if (matchFilter(path)) { -RawResource res = src.getResource(path); -if (res != null) { -dst.putResource(path, res.inputStream, res.timestamp); -res.inputStream.close(); -} else { -System.out.println("Resource not exist for " + path); +try { +RawResource res = src.getResource(path); +if (res != null) { +dst.putResource(path, res.inputStream, res.timestamp); +res.inputStream.close(); +} else { +System.out.println("Resource not exist for " + path); +} +} catch (Exception ex) { +System.err.println("Failed to open " + path); +ex.printStackTrace(); } } } http://git-wip-us.apache.org/repos/asf/kylin/blob/e088cb5d/core-cube/src/main/java/org/apache/kylin/cube/kv/CubeDimEncMap.java -- diff --git a/core-cube/src/main/java/org/apache/kylin/cube/kv/CubeDimEncMap.java b/core-cube/src/main/java/org/apache/kylin/cube/kv/CubeDimEncMap.java index e3c81f1..e8c5266 100644 --- a/core-cube/src/main/java/org/apache/kylin/cube/kv/CubeDimEncMap.java +++ b/core-cube/src/main/java/org/apache/kylin/cube/kv/CubeDimEncMap.java @@ -1,80 +1,89 @@ -/* - * 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.cube.kv; - -import java.util.Map; - -import org.apache.kylin.cube.CubeSegment; -import org.apache.kylin.cube.model.CubeDesc; -import org.apache.kylin.cube.model.RowKeyColDesc; -import org.apache.kylin.dimension.Dictionary; -import org.apache.kylin.dimension.DictionaryDimEnc; -import org.apache.kylin.dimension.DimensionEncoding; -import org.apache.kylin.dimension.FixedLenDimEnc; -import org.apache.kylin.dimension.IDimensionEncodingMap; -import org.apache.kylin.metadata.model.TblColRef; - -import com.google.common.collect.Maps; - -public class CubeDimEncMap implements IDimensionEncodingMap { - -final private CubeDesc cubeDesc; -final private CubeSegment seg; -final private Map dictionaryMap; -final private Map encMap = Maps.newHashMap(); - -public CubeDimEncMap(CubeSegment seg) { -this.cubeDesc = seg.getCubeDesc(); -this.seg = seg; -this.dictionaryMap = null; -} - -public CubeDimEncMap(CubeDesc
[39/50] [abbrv] kylin git commit: KYLIN_1514 Fix MD5 validation of tomcat when package tar
KYLIN_1514 Fix MD5 validation of tomcat when package tar Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/f01876f2 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/f01876f2 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/f01876f2 Branch: refs/heads/master Commit: f01876f24d0f26579bc53388a407208063eddee0 Parents: a6a0e7e Author: lidongsjtuAuthored: Tue Mar 22 10:06:41 2016 +0800 Committer: lidongsjtu Committed: Tue Mar 22 10:06:41 2016 +0800 -- build/script/download-tomcat.sh | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/f01876f2/build/script/download-tomcat.sh -- diff --git a/build/script/download-tomcat.sh b/build/script/download-tomcat.sh index e11aa6f..ea2b86e 100755 --- a/build/script/download-tomcat.sh +++ b/build/script/download-tomcat.sh @@ -22,18 +22,24 @@ cd ${dir}/../.. rm -rf build/tomcat +alias md5cmd="md5sum" +if [[ `uname -a` =~ "Darwin" ]]; then +alias md5cmd="md5 -q" +fi + if [ ! -f "build/apache-tomcat-7.0.59.tar.gz" ] then echo "no binary file found" wget --directory-prefix=build/ http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz || echo "download tomcat failed" else -if [ `md5sum apache-tomcat-7.0.59.tar.gz | awk '{print $1}'` != "ec570258976edf9a833cd88fd9220909" ] +if [ `md5cmd build/apache-tomcat-7.0.59.tar.gz | awk '{print $1}'` != "ec570258976edf9a833cd88fd9220909" ] then echo "md5 check failed" -rm apache-tomcat-7.0.59.tar.gz +rm build/apache-tomcat-7.0.59.tar.gz wget --directory-prefix=build/ http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz || echo "download tomcat failed" fi fi +unalias md5cmd tar -zxvf build/apache-tomcat-7.0.59.tar.gz -C build/ mv build/apache-tomcat-7.0.59 build/tomcat
[47/50] [abbrv] kylin git commit: cancel disable button feature at job refresh page
cancel disable button feature at job refresh page Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/6afeafcf Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/6afeafcf Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/6afeafcf Branch: refs/heads/master Commit: 6afeafcf31ce8244b23672bea7897b649d3a2a1f Parents: 61c6288 Author: JasonAuthored: Tue Mar 22 15:59:38 2016 +0800 Committer: Jason Committed: Tue Mar 22 16:00:11 2016 +0800 -- webapp/app/partials/jobs/job_refresh.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/6afeafcf/webapp/app/partials/jobs/job_refresh.html -- diff --git a/webapp/app/partials/jobs/job_refresh.html b/webapp/app/partials/jobs/job_refresh.html index aa8f930..e3f452f 100644 --- a/webapp/app/partials/jobs/job_refresh.html +++ b/webapp/app/partials/jobs/job_refresh.html @@ -92,8 +92,7 @@ Close -Submit +Submit
[34/50] [abbrv] kylin git commit: KYLIN-1476 Support measure dictionary in 1.x
KYLIN-1476 Support measure dictionary in 1.x Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/cfd5eb45 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/cfd5eb45 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/cfd5eb45 Branch: refs/heads/1.3.x Commit: cfd5eb45f65e86299730a68d9507f14ba8ca1a9a Parents: a9a6f5f Author: wangxiaoyuAuthored: Tue Mar 8 23:39:51 2016 +0800 Committer: Xiaoyu Wang Committed: Mon Mar 21 20:00:57 2016 +0800 -- .../java/org/apache/kylin/cube/CubeManager.java | 26 - .../kylin/cube/cli/DictionaryGeneratorCLI.java | 14 +++ .../kylin/job/cube/MergeDictionaryStep.java | 17 - .../hadoop/cube/FactDistinctColumnsMapper.java | 40 +--- .../hadoop/cube/FactDistinctColumnsReducer.java | 12 ++ .../hadoop/hive/CubeJoinedFlatTableDesc.java| 18 +++-- 6 files changed, 65 insertions(+), 62 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/cfd5eb45/cube/src/main/java/org/apache/kylin/cube/CubeManager.java -- diff --git a/cube/src/main/java/org/apache/kylin/cube/CubeManager.java b/cube/src/main/java/org/apache/kylin/cube/CubeManager.java index 88ce4f1..4615762 100644 --- a/cube/src/main/java/org/apache/kylin/cube/CubeManager.java +++ b/cube/src/main/java/org/apache/kylin/cube/CubeManager.java @@ -194,11 +194,11 @@ public class CubeManager implements IRealizationProvider { public DictionaryInfo buildDictionary(CubeSegment cubeSeg, TblColRef col, String factColumnsPath) throws IOException { CubeDesc cubeDesc = cubeSeg.getCubeDesc(); -if (!cubeDesc.getRowkey().isUseDictionary(col)) +if (!cubeDesc.getAllColumnsNeedDictionary().contains(col)) return null; DictionaryManager dictMgr = getDictionaryManager(); -DictionaryInfo dictInfo = dictMgr.buildDictionary(cubeDesc.getModel(), cubeDesc.getRowkey().getDictionary(col), col, factColumnsPath); +DictionaryInfo dictInfo = dictMgr.buildDictionary(cubeDesc.getModel(), "true", col, factColumnsPath); if (dictInfo != null) { cubeSeg.putDictResPath(col, dictInfo.getResourcePath()); @@ -791,4 +791,26 @@ public class CubeManager implements IRealizationProvider { return getCube(name); } + +/** + * Get the columns which need build the dictionary from fact table. (the column exists on fact and is not fk) + * @param cubeDesc + * @return + * @throws IOException + */ +public List getAllDictColumnsOnFact(CubeDesc cubeDesc) throws IOException { +List dictionaryColumns = cubeDesc.getAllColumnsNeedDictionary(); + +List factDictCols = new ArrayList(); +DictionaryManager dictMgr = DictionaryManager.getInstance(config); +for (int i = 0; i < dictionaryColumns.size(); i++) { +TblColRef col = dictionaryColumns.get(i); + +String scanTable = (String) dictMgr.decideSourceData(cubeDesc.getModel(), "true", col, null)[0]; +if (cubeDesc.getModel().isFactTable(scanTable)) { +factDictCols.add(col); +} +} +return factDictCols; +} } http://git-wip-us.apache.org/repos/asf/kylin/blob/cfd5eb45/cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java -- diff --git a/cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java b/cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java index 3cdaa93..bcbd496 100644 --- a/cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java +++ b/cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java @@ -44,15 +44,13 @@ public class DictionaryGeneratorCLI { private static void processSegment(KylinConfig config, CubeSegment cubeSeg, String factColumnsPath) throws IOException { CubeManager cubeMgr = CubeManager.getInstance(config); -for (DimensionDesc dim : cubeSeg.getCubeDesc().getDimensions()) { -// dictionary -for (TblColRef col : dim.getColumnRefs()) { -if (cubeSeg.getCubeDesc().getRowkey().isUseDictionary(col)) { -logger.info("Building dictionary for " + col); -cubeMgr.buildDictionary(cubeSeg, col, factColumnsPath); -} -} +// dictionary +for (TblColRef col : cubeSeg.getCubeDesc().getAllColumnsNeedDictionary()) { +logger.info("Building dictionary for " + col); +cubeMgr.buildDictionary(cubeSeg, col, factColumnsPath); +} +for (DimensionDesc dim :
[06/50] [abbrv] kylin git commit: update v1.5.0 download link and blog
http://git-wip-us.apache.org/repos/asf/kylin/blob/6bbdee49/website/_docs15/release_notes.md -- diff --git a/website/_docs15/release_notes.md b/website/_docs15/release_notes.md index 3d2f247..1adefee 100644 --- a/website/_docs15/release_notes.md +++ b/website/_docs15/release_notes.md @@ -10,7 +10,8 @@ there are source code package, binary package, ODBC driver and installation guid Any problem or issue, please report to Apache Kylin JIRA project: [https://issues.apache.org/jira/browse/KYLIN](https://issues.apache.org/jira/browse/KYLIN) -or send to Apache Kylin mailing list: +or send to Apache Kylin mailing list: + * User relative: [u...@kylin.apache.org](mailto:u...@kylin.apache.org) * Development relative: [d...@kylin.apache.org](mailto:d...@kylin.apache.org) @@ -18,306 +19,462 @@ or send to Apache Kylin mailing list: ## v1.5.0 - 2016-03-12 _Tag:_ [kylin-1.5.0](https://github.com/apache/kylin/tree/kylin-1.5.0) -__Significant changes have taken place in metadata and cube data, upgrade from v1.3 and before is difficult. Recommend build new cube from scratch with this version.__ - -__JIRA system is down at the time of writing, below is pending manual revision.__ +Significant changes have taken place in metadata and cube data, upgrade from v1.3 and before is difficult. Recommend build new cube from scratch with this version. __Highlights__ -* [KYLIN-875] - A plugin-able architecture, to allow alternative cube engine / storage engine / data source. -* [KYLIN-1245] - A better MR cubing algorithm, about 1.5 times faster by comparing hundreds of jobs. -* [KYLIN-942] - A better storage engine, makes query roughly 2 times faster (especially for slow queries) by comparing tens of thousands sqls. -* [KYLIN-738] - Streaming cubing EXPERIMENTAL support, source from kafka, build cube in-mem at minutes interval. -* [KYLIN-242] - Redesign aggregation group, support of 20+ dimensions made easy. -* [KYLIN-976] - Custom aggregation types (or UDF in other words). -* [KYLIN-943] - TopN aggregation type. -* [KYLIN-1065] - ODBC compatible with Tableau 9.1, MS Excel, MS PowerBI. -* [KYLIN-1219] - Kylin support SSO with Spring SAML. +* [KYLIN-875] - A plugin-able architecture, to allow alternative cube engine / storage engine / data source. +* [KYLIN-1245] - A better MR cubing algorithm, about 1.5 times faster by comparing hundreds of jobs. +* [KYLIN-942] - A better storage engine, makes query roughly 2 times faster (especially for slow queries) by comparing tens of thousands sqls. +* [KYLIN-738] - Streaming cubing EXPERIMENTAL support, source from kafka, build cube in-mem at minutes interval. +* [KYLIN-242] - Redesign aggregation group, support of 20+ dimensions made easy. +* [KYLIN-976] - Custom aggregation types (or UDF in other words). +* [KYLIN-943] - TopN aggregation type. +* [KYLIN-1065] - ODBC compatible with Tableau 9.1, MS Excel, MS PowerBI. +* [KYLIN-1219] - Kylin support SSO with Spring SAML. + +__New Feature__ + +* [KYLIN-528] - Build job flow for Inverted Index building +* [KYLIN-579] - Unload table from Kylin +* [KYLIN-596] - Support Excel and Power BI +* [KYLIN-599] - Near real-time support +* [KYLIN-607] - More efficient cube building +* [KYLIN-609] - Add Hybrid as a federation of Cube and Inverted-index realization +* [KYLIN-625] - Create GridTable, a data structure that abstracts vertical and horizontal partition of a table +* [KYLIN-728] - IGTStore implementation which use disk when memory runs short +* [KYLIN-738] - StreamingOLAP +* [KYLIN-749] - support timestamp type in II and cube +* [KYLIN-774] - Automatically merge cube segments +* [KYLIN-868] - add a metadata backup/restore script in bin folder +* [KYLIN-886] - Data Retention for streaming data +* [KYLIN-906] - cube retention +* [KYLIN-943] - Approximate TopN supported by Cube +* [KYLIN-986] - Generalize Streaming scripts and put them into code repository +* [KYLIN-1219] - Kylin support SSO with Spring SAML +* [KYLIN-1277] - Upgrade tool to put old-version cube and new-version cube into a hybrid model +* [KYLIN-1458] - Checking the consistency of cube segment host with the environment after cube migration + +* [KYLIN-976] - Support Custom Aggregation Types +* [KYLIN-1054] - Support Hive client Beeline +* [KYLIN-1128] - Clone Cube Metadata +* [KYLIN-1186] - Support precise Count Distinct using bitmap (under limited conditions) +* [KYLIN-1458] - Checking the consistency of cube segment host with the environment after cube migration +* [KYLIN-1483] - Command tool to visualize all cuboids in a cube/segment + +__Improvement__ + +* [KYLIN-225] - Support edit "cost" of cube +* [KYLIN-410] - table schema not expand when clicking the database text +* [KYLIN-589] - Cleanup Intermediate hive table after cube build +* [KYLIN-623] - update Kylin UI Style to latest AdminLTE +* [KYLIN-633] - Support Timestamp for cube
[38/50] [abbrv] kylin git commit: KYLIN-1122 fixed SQLDigest.isRawQuery derive logic
KYLIN-1122 fixed SQLDigest.isRawQuery derive logic Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/6c536021 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/6c536021 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/6c536021 Branch: refs/heads/1.3.x Commit: 6c536021e1ce3fab477a8761fe602143aef24c87 Parents: bbdf1d0 Author: wangxiaoyuAuthored: Sun Mar 20 21:57:08 2016 +0800 Committer: Xiaoyu Wang Committed: Mon Mar 21 20:01:04 2016 +0800 -- .../java/org/apache/kylin/measure/raw/RawMeasureType.java | 4 ++-- .../java/org/apache/kylin/metadata/realization/SQLDigest.java | 7 ++- .../org/apache/kylin/query/enumerator/CubeEnumerator.java | 1 - 3 files changed, 8 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/6c536021/metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java -- diff --git a/metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java b/metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java index c6b1637..e67ca9b 100644 --- a/metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java +++ b/metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java @@ -160,7 +160,7 @@ public class RawMeasureType extends MeasureType { public CapabilityResult.CapabilityInfluence influenceCapabilityCheck(Collection unmatchedDimensions, Collection unmatchedAggregations, SQLDigest digest, MeasureDesc measureDesc) { //is raw query -if (digest.aggregations.size() != 0 || digest.metricColumns.size() != 0) +if (!digest.isRawQuery()) return null; TblColRef rawColumn = getRawColumn(measureDesc.getFunction()); @@ -191,7 +191,7 @@ public class RawMeasureType extends MeasureType
{ @Override public void adjustSqlDigest(MeasureDesc measureDesc, SQLDigest sqlDigest) { -if (sqlDigest.isRawQuery) { +if (sqlDigest.isRawQuery()) { TblColRef col = this.getRawColumn(measureDesc.getFunction()); ParameterDesc colParameter = new ParameterDesc(); colParameter.setType("column"); http://git-wip-us.apache.org/repos/asf/kylin/blob/6c536021/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java -- diff --git a/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java b/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java index 3e124ba..16e268e 100644 --- a/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java +++ b/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java @@ -37,7 +37,7 @@ public class SQLDigest { public Collection filterColumns; public Collection metricColumns; public Collection aggregations; -public boolean isRawQuery = false; +private boolean isRawQuery = false; public SQLDigest(String factTable, TupleFilter filter, Collection joinDescs, Collection allColumns, // Collection groupbyColumns, Collection filterColumns, Collection aggregatedColumns, Collection aggregateFunnc) { @@ -49,6 +49,11 @@ public class SQLDigest { this.filterColumns = filterColumns; this.metricColumns = aggregatedColumns; this.aggregations = aggregateFunnc; +this.isRawQuery = this.groupbyColumns.isEmpty() && this.metricColumns.isEmpty(); +} + +public boolean isRawQuery() { +return isRawQuery; } @Override http://git-wip-us.apache.org/repos/asf/kylin/blob/6c536021/query/src/main/java/org/apache/kylin/query/enumerator/CubeEnumerator.java -- diff --git a/query/src/main/java/org/apache/kylin/query/enumerator/CubeEnumerator.java b/query/src/main/java/org/apache/kylin/query/enumerator/CubeEnumerator.java index a556847..66a4035 100644 --- a/query/src/main/java/org/apache/kylin/query/enumerator/CubeEnumerator.java +++ b/query/src/main/java/org/apache/kylin/query/enumerator/CubeEnumerator.java @@ -192,7 +192,6 @@ public class CubeEnumerator implements Enumerator
[15/50] [abbrv] kylin git commit: make v1.5.0 document the deafult document
make v1.5.0 document the deafult document Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/cb3b8444 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/cb3b8444 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/cb3b8444 Branch: refs/heads/document Commit: cb3b8444dadcf4d096333a13a7d68f84be05c323 Parents: a144961 Author: Yang LiAuthored: Sat Mar 19 08:15:52 2016 +0800 Committer: Yang Li Committed: Sat Mar 19 08:15:52 2016 +0800 -- website/_docs15/release_notes.md | 2 +- website/_includes/header.cn.html | 2 +- website/_includes/header.html| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/cb3b8444/website/_docs15/release_notes.md -- diff --git a/website/_docs15/release_notes.md b/website/_docs15/release_notes.md index 1adefee..9b46d0d 100644 --- a/website/_docs15/release_notes.md +++ b/website/_docs15/release_notes.md @@ -19,7 +19,7 @@ or send to Apache Kylin mailing list: ## v1.5.0 - 2016-03-12 _Tag:_ [kylin-1.5.0](https://github.com/apache/kylin/tree/kylin-1.5.0) -Significant changes have taken place in metadata and cube data, upgrade from v1.3 and before is difficult. Recommend build new cube from scratch with this version. +__This version is not backward compatible.__ The format of cube and metadata has been refactored in order to get times of performance improvement. We recommend this version, but does not suggest upgrade from previous deployment directly. A clean and new deployment of this version is strongly recommended. If you have to upgrade from previous deployment, an upgrade guide will be provided by community later. __Highlights__ http://git-wip-us.apache.org/repos/asf/kylin/blob/cb3b8444/website/_includes/header.cn.html -- diff --git a/website/_includes/header.cn.html b/website/_includes/header.cn.html index 24627ff..3f6bdbe 100644 --- a/website/_includes/header.cn.html +++ b/website/_includes/header.cn.html @@ -40,7 +40,7 @@ é¦é¡µ - ææ¡£ + ææ¡£ ä¸è½½ ç¤¾åº å¼å http://git-wip-us.apache.org/repos/asf/kylin/blob/cb3b8444/website/_includes/header.html -- diff --git a/website/_includes/header.html b/website/_includes/header.html index ac44d3b..389ef3d 100644 --- a/website/_includes/header.html +++ b/website/_includes/header.html @@ -45,7 +45,7 @@ Home - Docs + Docs Download Community Development
[11/50] [abbrv] kylin git commit: KYLIN-1249 client library
KYLIN-1249 client library Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/a144961b Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/a144961b Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/a144961b Branch: refs/heads/document Commit: a144961baf56bd19da66a88c0fab9db5d3852405 Parents: 4f49bce Author: Hongbin MaAuthored: Thu Mar 17 18:30:17 2016 +0800 Committer: Hongbin Ma Committed: Thu Mar 17 18:30:28 2016 +0800 -- website/_data/docs-cn.yml | 1 + website/_data/docs.yml | 1 + website/_docs/tutorial/kylin_client_tool.cn.md | 2 -- website/_docs/tutorial/kylin_client_tool.md| 2 -- 4 files changed, 2 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/a144961b/website/_data/docs-cn.yml -- diff --git a/website/_data/docs-cn.yml b/website/_data/docs-cn.yml index f69fbe5..eeaca00 100644 --- a/website/_data/docs-cn.yml +++ b/website/_data/docs-cn.yml @@ -17,4 +17,5 @@ - tutorial/tableau_91 - tutorial/powerbi - tutorial/odbc + - tutorial/kylin_client_tool http://git-wip-us.apache.org/repos/asf/kylin/blob/a144961b/website/_data/docs.yml -- diff --git a/website/_data/docs.yml b/website/_data/docs.yml index c557ae7..5e5de00 100644 --- a/website/_data/docs.yml +++ b/website/_data/docs.yml @@ -44,6 +44,7 @@ - tutorial/tableau_91 - tutorial/powerbi - tutorial/odbc + - tutorial/kylin_client_tool - title: How To docs: http://git-wip-us.apache.org/repos/asf/kylin/blob/a144961b/website/_docs/tutorial/kylin_client_tool.cn.md -- diff --git a/website/_docs/tutorial/kylin_client_tool.cn.md b/website/_docs/tutorial/kylin_client_tool.cn.md index b8c6d8f..1f0bbcb 100644 --- a/website/_docs/tutorial/kylin_client_tool.cn.md +++ b/website/_docs/tutorial/kylin_client_tool.cn.md @@ -3,8 +3,6 @@ layout: docs-cn title: Kylin Client Tool 使ç¨æç¨ categories: æç¨ permalink: /cn/docs/tutorial/kylin_client_tool.html -version: v1.0 -since: v1.2.0 --- > Kylin-client-toolæ¯ä¸ä¸ªç¨pythonç¼åçï¼å®å ¨åºäºkylinçrest > apiçå·¥å ·ãå¯ä»¥å®ç°kylinçcubeå建ï¼ææ¶build > cubeï¼jobçæ交ãè°åº¦ãæ¥çãåæ¶ä¸æ¢å¤ã http://git-wip-us.apache.org/repos/asf/kylin/blob/a144961b/website/_docs/tutorial/kylin_client_tool.md -- diff --git a/website/_docs/tutorial/kylin_client_tool.md b/website/_docs/tutorial/kylin_client_tool.md index f81a4cf..5b3ee02 100644 --- a/website/_docs/tutorial/kylin_client_tool.md +++ b/website/_docs/tutorial/kylin_client_tool.md @@ -3,8 +3,6 @@ layout: docs title: Kylin Client Tool Tutorial categories: tutorial permalink: /docs/tutorial/kylin_client_tool.html -version: v1.0 -since: v1.2.0 --- > Kylin-client-tool is a tool coded with python, completely based on Kylin's > restful apis.
[22/50] [abbrv] kylin git commit: KYLIN-1507 find hive dependency jar on some platform like CDH
KYLIN-1507 find hive dependency jar on some platform like CDH Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/dba135f4 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/dba135f4 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/dba135f4 Branch: refs/heads/master Commit: dba135f4c8d834fce53f0d3490a77af6e204e24e Parents: 30cccbd Author: Yang LiAuthored: Sun Mar 20 20:13:08 2016 +0800 Committer: Yang Li Committed: Sun Mar 20 20:13:08 2016 +0800 -- .../engine/mr/common/AbstractHadoopJob.java | 68 ++-- 1 file changed, 35 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/dba135f4/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java -- diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java index fe60ca8..04b591f 100644 --- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java +++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java @@ -78,7 +78,7 @@ public abstract class AbstractHadoopJob extends Configured implements Tool { protected static final Option OPTION_CUBE_NAME = OptionBuilder.withArgName(BatchConstants.ARG_CUBE_NAME).hasArg().isRequired(true).withDescription("Cube name. For exmaple, flat_item_cube").create(BatchConstants.ARG_CUBE_NAME); protected static final Option OPTION_CUBING_JOB_ID = OptionBuilder.withArgName(BatchConstants.ARG_CUBING_JOB_ID).hasArg().isRequired(false).withDescription("ID of cubing job executable").create(BatchConstants.ARG_CUBING_JOB_ID); protected static final Option OPTION_II_NAME = OptionBuilder.withArgName(BatchConstants.ARG_II_NAME).hasArg().isRequired(true).withDescription("II name. For exmaple, some_ii").create(BatchConstants.ARG_II_NAME); -protected static final Option OPTION_SEGMENT_NAME = OptionBuilder.withArgName( BatchConstants.ARG_SEGMENT_NAME).hasArg().isRequired(true).withDescription("Cube segment name").create( BatchConstants.ARG_SEGMENT_NAME); +protected static final Option OPTION_SEGMENT_NAME = OptionBuilder.withArgName(BatchConstants.ARG_SEGMENT_NAME).hasArg().isRequired(true).withDescription("Cube segment name").create(BatchConstants.ARG_SEGMENT_NAME); protected static final Option OPTION_INPUT_PATH = OptionBuilder.withArgName(BatchConstants.ARG_INPUT).hasArg().isRequired(true).withDescription("Input path").create(BatchConstants.ARG_INPUT); protected static final Option OPTION_INPUT_FORMAT = OptionBuilder.withArgName(BatchConstants.ARG_INPUT_FORMAT).hasArg().isRequired(false).withDescription("Input format").create(BatchConstants.ARG_INPUT_FORMAT); protected static final Option OPTION_OUTPUT_PATH = OptionBuilder.withArgName(BatchConstants.ARG_OUTPUT).hasArg().isRequired(true).withDescription("Output path").create(BatchConstants.ARG_OUTPUT); @@ -90,6 +90,22 @@ public abstract class AbstractHadoopJob extends Configured implements Tool { protected static final Option OPTION_STATISTICS_OUTPUT = OptionBuilder.withArgName(BatchConstants.ARG_STATS_OUTPUT).hasArg().isRequired(false).withDescription("Statistics output").create(BatchConstants.ARG_STATS_OUTPUT); protected static final Option OPTION_STATISTICS_SAMPLING_PERCENT = OptionBuilder.withArgName(BatchConstants.ARG_STATS_SAMPLING_PERCENT).hasArg().isRequired(false).withDescription("Statistics sampling percentage").create(BatchConstants.ARG_STATS_SAMPLING_PERCENT); +private static final String MAP_REDUCE_CLASSPATH = "mapreduce.application.classpath"; + +private static final String KYLIN_HIVE_DEPENDENCY_JARS = "[^,]*hive-exec[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-metastore[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-hcatalog-core[0-9.-]+[^,]*?\\.jar"; + +protected static void runJob(Tool job, String[] args) { +try { +int exitCode = ToolRunner.run(job, args); +System.exit(exitCode); +} catch (Exception e) { +e.printStackTrace(System.err); +System.exit(5); +} +} + +// + protected String name; protected boolean isAsync = false; protected OptionsHelper optionsHelper = new OptionsHelper(); @@ -137,38 +153,6 @@ public abstract class AbstractHadoopJob extends Configured implements Tool { return retVal; } -protected static void runJob(Tool job, String[] args) { -try { -int exitCode = ToolRunner.run(job, args); -
[16/50] [abbrv] kylin git commit: add committee activities links
add committee activities links Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/3d2913de Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/3d2913de Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/3d2913de Branch: refs/heads/document Commit: 3d2913de8948cf91de2cf2ad42a7ec15044170bb Parents: cb3b844 Author: Yang LiAuthored: Sat Mar 19 10:01:15 2016 +0800 Committer: Yang Li Committed: Sat Mar 19 10:01:15 2016 +0800 -- website/community/index.md | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/3d2913de/website/community/index.md -- diff --git a/website/community/index.md b/website/community/index.md index ae35898..d055d2f 100644 --- a/website/community/index.md +++ b/website/community/index.md @@ -27,6 +27,12 @@ For convenience, there's a forum style mailing list archives which not part of o ### Social Media The official Kylin Twitter account: [@ApacheKylin](https://twitter.com/ApacheKylin) +### Community Activity Report + +* [Git Pulse](https://github.com/apache/kylin/pulse) +* [Git Graphs](https://github.com/apache/kylin/graphs) +* [Apache Committee Report](https://reporter.apache.org/?kylin) + ## Apache Kylin Team A successful project requires many people to play many roles. Some members write code, provide project mentorship, or author documentation. Others are valuable as testers, submitting patches and suggestions. @@ -37,8 +43,9 @@ A successful project requires many people to play many roles. Some members write {% for c in site.data.contributors %} | {{ c.name }} | http://home.apache.org/phonebook.html?uid={{ c.apacheId }}">{{ c.apacheId }} | http://github.com/{{ c.githubId }}">http://github.com/{{ c.githubId }}.png{% else %}{{ c.avatar }}{% endunless %}"> | {{ c.role }} | {% endfor %} -### Contributors -Contributors has commited code could be found [here](https://github.com/apache/kylin/graphs/contributors). +Detailed committee info is [here](https://projects.apache.org/committee.html?kylin). +Detailed code contribution is [here](https://github.com/apache/kylin/graphs/contributors). + __Other contributors__ | Name | Github| |
[25/50] [abbrv] kylin git commit: KYLIN-1122 fixed SQLDigest.isRawQuery derive logic
KYLIN-1122 fixed SQLDigest.isRawQuery derive logic Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/d3a1d85c Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/d3a1d85c Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/d3a1d85c Branch: refs/heads/KYLIN-1122-B1 Commit: d3a1d85c8c14ba1228d3f0990d6909bdccb71fa1 Parents: 4a6dbc7 Author: wangxiaoyuAuthored: Sun Mar 20 21:57:08 2016 +0800 Committer: wangxiaoyu Committed: Sun Mar 20 21:57:08 2016 +0800 -- .../java/org/apache/kylin/measure/raw/RawMeasureType.java | 4 ++-- .../java/org/apache/kylin/metadata/realization/SQLDigest.java | 7 ++- .../org/apache/kylin/query/enumerator/CubeEnumerator.java | 1 - 3 files changed, 8 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/d3a1d85c/metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java -- diff --git a/metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java b/metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java index c6b1637..e67ca9b 100644 --- a/metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java +++ b/metadata/src/main/java/org/apache/kylin/measure/raw/RawMeasureType.java @@ -160,7 +160,7 @@ public class RawMeasureType extends MeasureType { public CapabilityResult.CapabilityInfluence influenceCapabilityCheck(Collection unmatchedDimensions, Collection unmatchedAggregations, SQLDigest digest, MeasureDesc measureDesc) { //is raw query -if (digest.aggregations.size() != 0 || digest.metricColumns.size() != 0) +if (!digest.isRawQuery()) return null; TblColRef rawColumn = getRawColumn(measureDesc.getFunction()); @@ -191,7 +191,7 @@ public class RawMeasureType extends MeasureType
{ @Override public void adjustSqlDigest(MeasureDesc measureDesc, SQLDigest sqlDigest) { -if (sqlDigest.isRawQuery) { +if (sqlDigest.isRawQuery()) { TblColRef col = this.getRawColumn(measureDesc.getFunction()); ParameterDesc colParameter = new ParameterDesc(); colParameter.setType("column"); http://git-wip-us.apache.org/repos/asf/kylin/blob/d3a1d85c/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java -- diff --git a/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java b/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java index 3e124ba..16e268e 100644 --- a/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java +++ b/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java @@ -37,7 +37,7 @@ public class SQLDigest { public Collection filterColumns; public Collection metricColumns; public Collection aggregations; -public boolean isRawQuery = false; +private boolean isRawQuery = false; public SQLDigest(String factTable, TupleFilter filter, Collection joinDescs, Collection allColumns, // Collection groupbyColumns, Collection filterColumns, Collection aggregatedColumns, Collection aggregateFunnc) { @@ -49,6 +49,11 @@ public class SQLDigest { this.filterColumns = filterColumns; this.metricColumns = aggregatedColumns; this.aggregations = aggregateFunnc; +this.isRawQuery = this.groupbyColumns.isEmpty() && this.metricColumns.isEmpty(); +} + +public boolean isRawQuery() { +return isRawQuery; } @Override http://git-wip-us.apache.org/repos/asf/kylin/blob/d3a1d85c/query/src/main/java/org/apache/kylin/query/enumerator/CubeEnumerator.java -- diff --git a/query/src/main/java/org/apache/kylin/query/enumerator/CubeEnumerator.java b/query/src/main/java/org/apache/kylin/query/enumerator/CubeEnumerator.java index a556847..66a4035 100644 --- a/query/src/main/java/org/apache/kylin/query/enumerator/CubeEnumerator.java +++ b/query/src/main/java/org/apache/kylin/query/enumerator/CubeEnumerator.java @@ -192,7 +192,6 @@ public class CubeEnumerator implements Enumerator
[08/50] [abbrv] kylin git commit: KYLIN-1249 A client library to help automatic cube
http://git-wip-us.apache.org/repos/asf/kylin/blob/bb83cbeb/tools/kylin_client_tool/scheduler/workers/cube.py -- diff --git a/tools/kylin_client_tool/scheduler/workers/cube.py b/tools/kylin_client_tool/scheduler/workers/cube.py new file mode 100644 index 000..b18be6e --- /dev/null +++ b/tools/kylin_client_tool/scheduler/workers/cube.py @@ -0,0 +1,122 @@ +# -*- coding: utf-8 -*- +__author__ = 'Huang, Hua' + +import time +import datetime +import calendar +from jobs.build import CubeBuildJob +from jobs.cube import CubeJob +from models.request import JobBuildRequest +from models.job import JobInstance, CubeJobStatus +from settings.settings import KYLIN_JOB_MAX_COCURRENT, KYLIN_JOB_MAX_RETRY + + +class CubeWorker: +job_instance_dict = {} +job_retry_dict = {} +scheduler = None +run_cube_job_id = None +check_cube_job_id = None + +def __init__(self): +pass + +@staticmethod +def run_cube_job(endtime): +if CubeWorker.all_finished(): +return True + +running_job_list = CubeWorker.get_current_running_job() +print "current running", len(running_job_list), "jobs" + +if running_job_list and len(running_job_list) >= KYLIN_JOB_MAX_COCURRENT: +print "will not schedule new jobs this time because running job number >= the max cocurrent job number", KYLIN_JOB_MAX_COCURRENT +else: +max_allow = KYLIN_JOB_MAX_COCURRENT - len(running_job_list) +for cube_name in CubeWorker.job_instance_dict: +if max_allow <= 0: break + +job_instance = CubeWorker.job_instance_dict[cube_name] +if job_instance is None or ( +isinstance(job_instance, JobInstance) and job_instance.get_status() == CubeJobStatus.ERROR): +try_cnt = CubeWorker.job_retry_dict.get(cube_name, -1) + +if try_cnt >= KYLIN_JOB_MAX_RETRY: +# have already tried KYLIN_JOB_MAX_RETRY times +CubeWorker.job_instance_dict[cube_name] = 0 +else: +# try to cancel the error cube build segment +error_job_list = CubeJob.get_cube_job(cube_name, CubeJob.ERROR_JOB_STATUS) +if error_job_list: +for error_job in error_job_list: +CubeBuildJob.cancel_job(error_job.uuid) +print "cancel an error job with uuid=", error_job.uuid, "for cube=", cube_name + +# run cube job +# instance_list = CubeJob.list_cubes(cube_name) +build_request = JobBuildRequest() +if endtime is not None: +# build_request.startTime = instance_list[0].segments[instance_list[0].segments.__len__() - 1].date_range_end +build_request.endTime = \ + (int(time.mktime(datetime.datetime.strptime(endtime, + "%Y-%m-%d").timetuple())) - time.timezone) * 1000 +else: +d = datetime.datetime.utcnow() +build_request.endTime = calendar.timegm(d.utctimetuple()) * 1000 + +current_job_instance = CubeBuildJob.rebuild_cube(cube_name, build_request) + +if current_job_instance: +print "schedule a cube build job for cube =", cube_name +CubeWorker.job_instance_dict[cube_name] = current_job_instance +max_allow -= 1 +CubeWorker.job_retry_dict[cube_name] = try_cnt + 1 + +@staticmethod +def check_cube_job(): +for cube_name in CubeWorker.job_instance_dict: +job_instance = CubeWorker.job_instance_dict[cube_name] +if isinstance(job_instance, + JobInstance) and job_instance.uuid and job_instance.get_status() == CubeJobStatus.RUNNING: +current_job_instance = CubeBuildJob.get_job(job_instance.uuid) +if current_job_instance: +CubeWorker.job_instance_dict[cube_name] = current_job_instance + +job_instance = CubeWorker.job_instance_dict[cube_name] +if job_instance is None: +print "status of cube =", cube_name, "is NOT STARTED YET" +elif isinstance(job_instance, JobInstance): +print "status of cube =", cube_name, "is", job_instance.get_status(), "at %d/%d" % ( +job_instance.get_current_step(), len(job_instance.steps)) + +@staticmethod +def get_current_running_job(): +if not CubeWorker.job_instance_dict: +return None + +
[37/50] [abbrv] kylin git commit: KYLIN-1122 SQLDigest.isRawQuery logic bug fixed
KYLIN-1122 SQLDigest.isRawQuery logic bug fixed Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/03165f39 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/03165f39 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/03165f39 Branch: refs/heads/1.3.x Commit: 03165f39fcd0aca496b5d706867463aa4cf41e91 Parents: 6c53602 Author: Xiaoyu WangAuthored: Mon Mar 21 19:55:03 2016 +0800 Committer: Xiaoyu Wang Committed: Mon Mar 21 20:01:04 2016 +0800 -- .../main/java/org/apache/kylin/metadata/realization/SQLDigest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/03165f39/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java -- diff --git a/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java b/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java index 16e268e..8ff144f 100644 --- a/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java +++ b/metadata/src/main/java/org/apache/kylin/metadata/realization/SQLDigest.java @@ -49,7 +49,7 @@ public class SQLDigest { this.filterColumns = filterColumns; this.metricColumns = aggregatedColumns; this.aggregations = aggregateFunnc; -this.isRawQuery = this.groupbyColumns.isEmpty() && this.metricColumns.isEmpty(); +this.isRawQuery = this.groupbyColumns.isEmpty() && this.aggregations.isEmpty(); } public boolean isRawQuery() {
[17/50] [abbrv] kylin git commit: Compress with tools dir.
Compress with tools dir. Signed-off-by: Hongbin MaProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/a9a6f5f2 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/a9a6f5f2 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/a9a6f5f2 Branch: refs/heads/1.3.x Commit: a9a6f5f281b4eba5bfb1ea23a1b3a390ed48533d Parents: bb83cbe Author: nichunen Authored: Fri Mar 18 17:56:21 2016 +0800 Committer: Hongbin Ma Committed: Sun Mar 20 14:00:01 2016 +0800 -- script/compress.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/a9a6f5f2/script/compress.sh -- diff --git a/script/compress.sh b/script/compress.sh index 96044a6..f309799 100755 --- a/script/compress.sh +++ b/script/compress.sh @@ -33,7 +33,7 @@ package_name=apache-kylin-${version}-bin rm -rf dist/${package_name} mkdir dist/${package_name} # copy files -cp -r lib bin conf dist/tomcat examples/sample_cube dist/commit.sha1 dist/${package_name} +cp -r lib bin conf tools dist/tomcat examples/sample_cube dist/commit.sha1 dist/${package_name} # copy license files cp LICENSE README.md NOTICE dist/${package_name}
[31/50] [abbrv] kylin git commit: minor, update find hive dependency script to avoid soft links of jars
minor, update find hive dependency script to avoid soft links of jars Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/57ac1493 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/57ac1493 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/57ac1493 Branch: refs/heads/KYLIN-1122-B1 Commit: 57ac14932d52c1529b4f1a95f70f0cff62b69004 Parents: d3a1d85 Author: lidongsjtuAuthored: Wed Mar 9 16:18:00 2016 +0800 Committer: Xiaoyu Wang Committed: Mon Mar 21 19:57:35 2016 +0800 -- bin/find-hive-dependency.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/57ac1493/bin/find-hive-dependency.sh -- diff --git a/bin/find-hive-dependency.sh b/bin/find-hive-dependency.sh index 15e9e0a..8adb1ec 100755 --- a/bin/find-hive-dependency.sh +++ b/bin/find-hive-dependency.sh @@ -41,7 +41,7 @@ fi for data in ${arr[@]} do -result=`echo $data | grep -e 'hive-exec[a-z0-9A-Z\.-]*jar'` +result=`echo $data | grep -e 'hive-exec[a-z0-9A-Z\.-]*.jar'` if [ $result ] then hive_exec_path=$data @@ -82,7 +82,7 @@ else hcatalog_home=${HCAT_HOME} fi -hcatalog=`find -L ${hcatalog_home} -name "hive-hcatalog-core[0-9\.-]*jar" 2>&1 | grep -m 1 -v 'Permission denied'` +hcatalog=`find -L ${hcatalog_home} -name "hive-hcatalog-core[0-9\.-]*.jar" 2>&1 | grep -m 1 -v 'Permission denied'` if [ -z "$hcatalog" ] then
[07/50] [abbrv] kylin git commit: update v1.5.0 download link and blog
update v1.5.0 download link and blog Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/6bbdee49 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/6bbdee49 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/6bbdee49 Branch: refs/heads/document Commit: 6bbdee49ab43de95d3ffd798f07705f86bb5f692 Parents: ba614aa Author: Li YangAuthored: Thu Mar 17 18:11:30 2016 +0800 Committer: Li Yang Committed: Thu Mar 17 18:11:47 2016 +0800 -- website/_docs15/release_notes.md| 1311 ++ .../_posts/blog/2016-03-16-release-v1.5.0.cn.md | 40 + .../_posts/blog/2016-03-16-release-v1.5.0.md| 40 + website/assets/css/styles.css |4 +- website/download/index.md | 15 +- 5 files changed, 824 insertions(+), 586 deletions(-) --
[24/50] [abbrv] kylin git commit: add topn blog
add topn blog Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/27c5cc4d Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/27c5cc4d Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/27c5cc4d Branch: refs/heads/document Commit: 27c5cc4d5bf42ae49906c696784dc45c2e7828d6 Parents: 3d2913d Author: shaofengshiAuthored: Sun Mar 20 20:58:06 2016 +0800 Committer: shaofengshi Committed: Sun Mar 20 20:58:27 2016 +0800 -- .../blog/2016-03-19-approximate-topn-measure.md | 168 +++ 1 file changed, 168 insertions(+) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/27c5cc4d/website/_posts/blog/2016-03-19-approximate-topn-measure.md -- diff --git a/website/_posts/blog/2016-03-19-approximate-topn-measure.md b/website/_posts/blog/2016-03-19-approximate-topn-measure.md new file mode 100644 index 000..5e9951b --- /dev/null +++ b/website/_posts/blog/2016-03-19-approximate-topn-measure.md @@ -0,0 +1,168 @@ +--- +layout: post-blog +title: Approximate Top-N support in Kylin +date: 2016-03-19 16:30:00 +author: Shaofeng Shi +categories: blog +--- + + +## Background + +Find the Top-N (or Top-K) entities from a dataset is a common scenario and requirement in data minding; We often see the reports or news like "Top 100 companies in the world", "Most popular 20 electronics sold on eBay", etc. Exploring and analysising the top entities can always find some high value information. + +Within the era of big data, this need is much stronger than ever before, as both the raw dataset and the number of entities can be vast; Without certain pre-calculation, get the Top-K entities among a distributed big dataset may take a long time, makes the ad-hoc query inefficient. + +In v1.5.0, Apache Kylin introduces the "Top-N" measure, aiming to pre-calculate the top entities during the cube build phase; in the query phase, Kylin can quickly fetch and return the top records. The performance would be much better than a cube without "Top-N", giving the analyst more power to inspect data. + +Please note, this "Top-N" measure is an approximate realization, to use it well you need have a good understanding with the algorithm as well as the data distribution. + +## Top-N query + +Let's start with the sample table that shipped in Kylin binary package. If you haven't run that, follow this tutorial to create it: [Quick Start with Sample Cube](https://kylin.apache.org/docs15/tutorial/kylin_sample.html). + +The sample fact table "default.kylin\_sales" mock the transactions on an online marketplace. It has a couple of dimension and measure columns. To be simple, here we only use four: "PART\_DT", "LSTG\_SITE\_ID", "SELLER\_ID" and "PRICE". Bellow table is the concept of these columns, with a rough cardinality, the "SELLER\_ID" is a high cardinality column. + + +| Column | Description | Cardinality| +|:- |:---:| :-:| +| PART\_DT | Transaction Date | 730: two years | +| LSTG\_SITE\_ID | Site ID, 0 represents 'US'| 50 | +| SELLER\_ID | Seller ID|About one million | +| PRICE | Sold amount |- | + +Very often this online marketplace company need to identify the top sellers (say top 100) in a given time period in some countries. The query looks like: + +``` +SELECT SELLER_ID, SUM(PRICE) FROM KYLIN_SALES + WHERE + PART_DT >= date'2016-02-18' AND PART_DT < date'2016-03-18' + AND LSTG_SITE_ID in (0) + group by SELLER_ID + order by SUM(PRICE) DESC limit 100; +``` + +## Without Top-N pre-calculation + +Before Kylin v1.5.0, all the "group by" columns need be as dimension, we come of a design that use PART\_DT, LSTG\_SITE\_ID and SELLER\_ID as dimensions, and define SUM(PRICE) as the measure. After build, the base cubiod of the cube will be like: + +| Rowkey of base cuboid | SUM(PRICE) | +|:- |:---:| +| 20140318\_00\_seller001| xx.xx | +| 20140318\_00\_seller002| xx.xx | +|...|...| +| 20140318\_00\_seller099| xx.xx | +| 20140318\_01\_seller099| xx.xx | +|...|...| +|...|...| +| 20160318\_49\_seller099| xx.xx | + +Assume these dimensions are independent. The number of rows in base cuboid is 730\*50\*1million = 36.5 billion. Other cuboids which include "SELLER\_ID" will also has millions of rows. At this moment you may notice that the cube expansion rate is high, the situation would be worse if there are more dimensions or the cardinality is higher. But the real challenge is not here. + +Soon you will find the Top-N query couldn't work, or took an unacceptable
[01/50] [abbrv] kylin git commit: KYLIN-1595 revise KylinVersion class [Forced Update!]
Repository: kylin Updated Branches: refs/heads/1.3.x 25902223b -> 0aeb71cae (forced update) refs/heads/1.3.x-HBase1.1.3 693385833 -> 20a47e67f (forced update) refs/heads/1.4-rc b6f83ff19 -> 7a8134b3c (forced update) refs/heads/KYLIN-1122-B1 57545dfa2 -> 4960a54f4 (forced update) refs/heads/KYLIN-1122-B2 9e960f621 -> 41bb1eea6 (forced update) refs/heads/KYLIN-1356 7b87d88be -> 1bc461349 (forced update) refs/heads/document 691f9dcc5 -> ef365bd4e (forced update) refs/heads/helix-rebase 4e2dd05b2 -> 3e6993536 (forced update) refs/heads/master aa2a024da -> 2dd49eb07 (forced update) refs/heads/v1.3.0-release 0441ceb40 -> 579c2eb08 (forced update) refs/heads/v1.5.0-release b6c559b29 -> 128336134 (forced update) Updated Tags: refs/tags/kylin-1.2 5bb31d4a7 -> 2528aa531 refs/tags/kylin-1.3 688c28b15 -> 57e9ca5ba refs/tags/kylin-1.3.0 b4f5fa753 -> 5cc56d5b3 refs/tags/kylin-1.4-alpha 629f87843 -> 9086efe8d refs/tags/kylin-1.5.0 97e35ee4a -> 9e3ecf72b KYLIN-1595 revise KylinVersion class Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/98f8e0af Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/98f8e0af Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/98f8e0af Branch: refs/heads/master Commit: 98f8e0af015de9aa10a2d1ca48f0a92d87cc72e0 Parents: d95d089 Author: Hongbin MaAuthored: Thu Mar 17 10:10:02 2016 +0800 Committer: Hongbin Ma Committed: Thu Mar 17 10:10:02 2016 +0800 -- .../org/apache/kylin/common/KylinVersion.java | 73 .../persistence/RootPersistentEntity.java | 2 +- .../org/apache/kylin/cube/model/CubeDesc.java | 4 +- 3 files changed, 46 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/98f8e0af/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java -- diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java b/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java index a006e1c..4bf5999 100644 --- a/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java +++ b/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java @@ -21,34 +21,50 @@ import java.util.Set; import javax.annotation.Nullable; -import com.google.common.base.Function; +import com.google.common.base.Preconditions; import com.google.common.base.Predicate; import com.google.common.collect.Iterables; public class KylinVersion { -static class Version { -public int major; -public int minor; -public int revision; +public int major; +public int minor; +public int revision; +public boolean isSnapshot; -public Version(String version) { -String[] splits = version.split("\\."); -major = Integer.parseInt(splits[0]); -minor = Integer.parseInt(splits[1]); -revision = Integer.parseInt(splits[2]); +public KylinVersion(String version) { + +Preconditions.checkNotNull(version); + +int index = version.indexOf("-");//index of "-SNAPSHOT" +String[] splits; +if (index == -1) { +splits = version.split("\\."); +isSnapshot = false; +} else { +splits = version.substring(0, index).split("\\."); +isSnapshot = true; } + +major = Integer.parseInt(splits[0]); +minor = Integer.parseInt(splits[1]); +revision = Integer.parseInt(splits[2]); +} + +@Override +public String toString() { +return "" + major + "." + minor + "." + revision; } /** * Require MANUAL updating kylin version per ANY upgrading. */ -private static final String CURRENT_KYLIN_VERSION = "1.5.1"; +private static final KylinVersion CURRENT_KYLIN_VERSION = new KylinVersion("1.5.1"); -private static final Set SIGNATURE_INCOMPATIBLE_REVISIONS = new HashSet(); +private static final Set SIGNATURE_INCOMPATIBLE_REVISIONS = new HashSet(); static { -SIGNATURE_INCOMPATIBLE_REVISIONS.add("1.5.1"); +SIGNATURE_INCOMPATIBLE_REVISIONS.add(new KylinVersion("1.5.1")); } /** @@ -58,13 +74,12 @@ public class KylinVersion { * * @return current kylin version in String */ -public static String getCurrentVersion() { +public static KylinVersion getCurrentVersion() { return CURRENT_KYLIN_VERSION; } -public static boolean isCompatibleWith(String version) { -Version v = new Version(version); -Version current = new Version(CURRENT_KYLIN_VERSION); +public boolean isCompatibleWith(KylinVersion v) { +KylinVersion current =