You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ma...@apache.org on 2016/11/14 10:27:35 UTC
[1/2] kylin git commit: KYLIN-2181 fail cube which uses fixedlength
for integer/number
Repository: kylin
Updated Branches:
refs/heads/master 07d892124 -> 8822e78af
KYLIN-2181 fail cube which uses fixedlength for integer/number
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/8822e78a
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/8822e78a
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/8822e78a
Branch: refs/heads/master
Commit: 8822e78af041dbcd00f89c5e3ef65a712d394d76
Parents: 8ed3fbc
Author: Hongbin Ma <ma...@apache.org>
Authored: Mon Nov 14 18:27:21 2016 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Mon Nov 14 18:27:25 2016 +0800
----------------------------------------------------------------------
.../main/java/org/apache/kylin/cube/model/RowKeyColDesc.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/8822e78a/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java b/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
index 9e2cb48..6192d76 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
@@ -23,6 +23,7 @@ import org.apache.kylin.dimension.DateDimEnc;
import org.apache.kylin.dimension.DictionaryDimEnc;
import org.apache.kylin.dimension.DimensionEncoding;
import org.apache.kylin.dimension.DimensionEncodingFactory;
+import org.apache.kylin.dimension.FixedLenDimEnc;
import org.apache.kylin.dimension.TimeDimEnc;
import org.apache.kylin.metadata.datatype.DataType;
import org.apache.kylin.metadata.model.TblColRef;
@@ -61,7 +62,7 @@ public class RowKeyColDesc {
column = column.toUpperCase();
bitIndex = index;
colRef = cubeDesc.getModel().findColumn(column);
- Preconditions.checkArgument(colRef != null, "Cannot find rowkey column %s in cube %s", column, cubeDesc);
+ Preconditions.checkArgument(colRef != null, "Cannot find rowkey column %s in cube %s", column, cubeDesc);
Preconditions.checkState(StringUtils.isNotEmpty(this.encoding));
Object[] encodingConf = DimensionEncoding.parseEncodingConf(this.encoding);
@@ -86,6 +87,8 @@ public class RowKeyColDesc {
throw new IllegalArgumentException(colRef + " type is " + type + " and cannot apply date encoding");
if (TimeDimEnc.ENCODING_NAME.equals(encodingName) && type.isTimeFamily() == false)
throw new IllegalArgumentException(colRef + " type is " + type + " and cannot apply time encoding");
+ if (encodingName.startsWith(FixedLenDimEnc.ENCODING_NAME) && (type.isIntegerFamily() || type.isNumberFamily()))
+ throw new IllegalArgumentException(colRef + " type is " + type + " and cannot apply fixed_length encoding");
}
public String getEncoding() {
[2/2] kylin git commit: add comments to KylinVersion
Posted by ma...@apache.org.
add comments to KylinVersion
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/8ed3fbc3
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/8ed3fbc3
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/8ed3fbc3
Branch: refs/heads/master
Commit: 8ed3fbc353965da9df7f18f53e84f0515200708e
Parents: 07d8921
Author: Hongbin Ma <ma...@apache.org>
Authored: Mon Nov 14 17:40:33 2016 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Mon Nov 14 18:27:25 2016 +0800
----------------------------------------------------------------------
.../main/java/org/apache/kylin/common/KylinVersion.java | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/8ed3fbc3/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 0e4147a..b7c3804 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
@@ -73,6 +73,17 @@ public class KylinVersion {
private static final Set<KylinVersion> SIGNATURE_INCOMPATIBLE_REVISIONS = new HashSet<KylinVersion>();
+ /**
+ * 1.5.1 is actually compatible with 1.5.0's cube. However the "calculate signature" method in 1.5.1 code base somehow
+ * gives different signature values for 1.5.0 cubes. To prevent from users having to take care of this mess, as people
+ * usually won't expect to take lots of efforts for small upgrade (from 1.5.0 to 1.5.1), a special list of
+ * SIGNATURE_INCOMPATIBLE_REVISIONS is introduced to silently take care of such legacy cubes.
+ *
+ * We should NEVER add new stuff to SIGNATURE_INCOMPATIBLE_REVISIONS. "calculate signature" should always return consistent values
+ * to compatible versions. If it's impossible to maintain consistent signatures between upgrade, we should increase the minor version,
+ * e.g. it's better to skip 1.5.1 and use 1.6.0 as the next release version to 1.5.0, or even to use 2.0.0, as people tends to accept
+ * doing more (e.g. Having to use sth like a metastore upgrade tool when upgrading Kylin)
+ */
static {
SIGNATURE_INCOMPATIBLE_REVISIONS.add(new KylinVersion("1.5.1"));
}