You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2017/04/13 12:07:06 UTC
kylin git commit: minor, fix kylin.sh version
Repository: kylin
Updated Branches:
refs/heads/2.0.x ca0aa4f4c -> 071ce90e5
minor, fix kylin.sh version
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/071ce90e
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/071ce90e
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/071ce90e
Branch: refs/heads/2.0.x
Commit: 071ce90e5ef1c3bc016b752eefa24d1ff7722b69
Parents: ca0aa4f
Author: lidongsjtu <li...@apache.org>
Authored: Thu Apr 13 20:06:53 2017 +0800
Committer: lidongsjtu <li...@apache.org>
Committed: Thu Apr 13 20:06:53 2017 +0800
----------------------------------------------------------------------
.../org/apache/kylin/common/KylinVersion.java | 28 ++++++++++----------
1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/071ce90e/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 bc91a7a..14fcfd0 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
@@ -65,24 +65,24 @@ public class KylinVersion implements Comparable {
public String toString() {
return "" + major + "." + minor + "." + revision;
}
-
+
@Override
public int compareTo(Object o) {
KylinVersion v = (KylinVersion) o;
int comp;
-
+
comp = this.major - v.major;
if (comp != 0)
return comp;
-
+
comp = this.minor - v.minor;
if (comp != 0)
return comp;
-
+
comp = this.revision - v.revision;
if (comp != 0)
return comp;
-
+
return (this.isSnapshot ? 0 : 1) - (v.isSnapshot ? 0 : 1);
}
@@ -92,18 +92,18 @@ public class KylinVersion implements Comparable {
private static final KylinVersion CURRENT_KYLIN_VERSION = new KylinVersion("2.0.0");
private static final KylinVersion VERSION_200 = new KylinVersion("2.0.0");
-
+
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
+ * 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
+ * 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 {
@@ -125,11 +125,11 @@ public class KylinVersion implements Comparable {
public static boolean isBefore200(String ver) {
return new KylinVersion(ver).compareTo(VERSION_200) < 0;
}
-
+
public static void main(String[] args) {
- System.out.println(isBefore200("2.0.0"));
+ System.out.println(getKylinClientInformation());
}
-
+
public boolean isCompatibleWith(KylinVersion v) {
KylinVersion current = CURRENT_KYLIN_VERSION;
if (current.major != v.major || current.minor != v.minor) {