kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject incubator-kylin git commit: KYLIN-875 Fix CI, replace LongWritable with LongMutable in II
Date Thu, 23 Jul 2015 07:35:50 GMT
Repository: incubator-kylin
Updated Branches:
  refs/heads/0.8 382345b2e -> ccdc4155e


KYLIN-875 Fix CI, replace LongWritable with LongMutable in II


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

Branch: refs/heads/0.8
Commit: ccdc4155e3e66d62a2db19e15a5ffea3e2eb333d
Parents: 382345b
Author: Li, Yang <yangli9@ebay.com>
Authored: Thu Jul 23 15:35:36 2015 +0800
Committer: Li, Yang <yangli9@ebay.com>
Committed: Thu Jul 23 15:35:36 2015 +0800

----------------------------------------------------------------------
 .../kylin/invertedindex/index/RawTableRecord.java    | 14 +++++++-------
 .../kylin/invertedindex/index/TableRecord.java       | 12 ++++++------
 .../invertedindex/index/TableRecordInfoDigest.java   | 15 ++++++++-------
 .../kylin/job/tools/LZOSupportnessChecker.java       |  2 +-
 4 files changed, 22 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ccdc4155/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/RawTableRecord.java
----------------------------------------------------------------------
diff --git a/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/RawTableRecord.java
b/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/RawTableRecord.java
index b72ad26..a13ea7b 100644
--- a/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/RawTableRecord.java
+++ b/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/RawTableRecord.java
@@ -18,14 +18,14 @@
 
 package org.apache.kylin.invertedindex.index;
 
+import java.util.Arrays;
+
+import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
+import org.apache.kylin.common.util.Bytes;
 import org.apache.kylin.common.util.BytesUtil;
 import org.apache.kylin.dict.Dictionary;
+import org.apache.kylin.metadata.measure.LongMutable;
 import org.apache.kylin.metadata.measure.fixedlen.FixedLenMeasureCodec;
-import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
-import org.apache.kylin.common.util.Bytes;
-import org.apache.hadoop.io.LongWritable;
-
-import java.util.Arrays;
 
 /**
  */
@@ -52,7 +52,7 @@ public class RawTableRecord implements Cloneable {
         return digest.isMetrics(col);
     }
 
-    public FixedLenMeasureCodec<LongWritable> codec(int col) {
+    public FixedLenMeasureCodec<LongMutable> codec(int col) {
         return digest.codec(col);
     }
 
@@ -76,7 +76,7 @@ public class RawTableRecord implements Cloneable {
         return BytesUtil.readUnsigned(buf, digest.offset(col), digest.length(col));
     }
 
-    public void setValueMetrics(int col, LongWritable value) {
+    public void setValueMetrics(int col, LongMutable value) {
         digest.codec(col).write(value, buf, digest.offset(col));
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ccdc4155/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/TableRecord.java
----------------------------------------------------------------------
diff --git a/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/TableRecord.java
b/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/TableRecord.java
index c4f4a8c..ef0673a 100644
--- a/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/TableRecord.java
+++ b/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/TableRecord.java
@@ -18,13 +18,13 @@
 
 package org.apache.kylin.invertedindex.index;
 
+import java.util.Arrays;
+
 import org.apache.commons.lang.ObjectUtils;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
-import org.apache.hadoop.io.LongWritable;
-import org.apache.kylin.dict.Dictionary;
 import org.apache.kylin.common.util.DateFormat;
-
-import java.util.Arrays;
+import org.apache.kylin.dict.Dictionary;
+import org.apache.kylin.metadata.measure.LongMutable;
 
 /**
  * TableRecord extends RawTableRecord by decorating it with a TableRecordInfo.
@@ -107,7 +107,7 @@ public class TableRecord implements Cloneable {
 
     public void setValueString(int col, String value) {
         if (rawRecord.isMetric(col)) {
-            LongWritable v = rawRecord.codec(col).valueOf(value);
+            LongMutable v = rawRecord.codec(col).valueOf(value);
             setValueMetrics(col, v);
         } else {
             final Dictionary<String> dict = info.dict(col);
@@ -143,7 +143,7 @@ public class TableRecord implements Cloneable {
         rawRecord.getValueBytes(col, bytes);
     }
 
-    private void setValueMetrics(int col, LongWritable value) {
+    private void setValueMetrics(int col, LongMutable value) {
         rawRecord.setValueMetrics(col, value);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ccdc4155/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/TableRecordInfoDigest.java
----------------------------------------------------------------------
diff --git a/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/TableRecordInfoDigest.java
b/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/TableRecordInfoDigest.java
index 65b2a21..e976862 100644
--- a/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/TableRecordInfoDigest.java
+++ b/invertedindex/src/main/java/org/apache/kylin/invertedindex/index/TableRecordInfoDigest.java
@@ -18,15 +18,16 @@
 
 package org.apache.kylin.invertedindex.index;
 
-import com.google.common.base.Objects;
-import org.apache.hadoop.io.LongWritable;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+
 import org.apache.kylin.common.util.BytesSerializer;
 import org.apache.kylin.common.util.BytesUtil;
+import org.apache.kylin.metadata.measure.LongMutable;
 import org.apache.kylin.metadata.measure.fixedlen.FixedLenMeasureCodec;
 import org.apache.kylin.metadata.model.DataType;
 
-import java.nio.ByteBuffer;
-import java.util.Arrays;
+import com.google.common.base.Objects;
 
 /**
  */
@@ -40,7 +41,7 @@ public class TableRecordInfoDigest {
     private int[] dictMaxIds;// max id for each of the dict
     private int[] lengths;// length of each encoded dict
     private boolean[] isMetric;// whether it's metric or dict
-    private FixedLenMeasureCodec[] measureCodecs;
+    private FixedLenMeasureCodec<?>[] measureCodecs;
 
 
     public TableRecordInfoDigest(int nColumns, int byteFormLen, //
@@ -124,9 +125,9 @@ public class TableRecordInfoDigest {
 
     // metrics go with fixed-len codec
     @SuppressWarnings("unchecked")
-    public FixedLenMeasureCodec<LongWritable> codec(int col) {
+    public FixedLenMeasureCodec<LongMutable> codec(int col) {
         // yes, all metrics are long currently
-        return measureCodecs[col];
+        return (FixedLenMeasureCodec<LongMutable>) measureCodecs[col];
     }
 
     public static byte[] serialize(TableRecordInfoDigest o) {

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ccdc4155/job/src/main/java/org/apache/kylin/job/tools/LZOSupportnessChecker.java
----------------------------------------------------------------------
diff --git a/job/src/main/java/org/apache/kylin/job/tools/LZOSupportnessChecker.java b/job/src/main/java/org/apache/kylin/job/tools/LZOSupportnessChecker.java
index ded5a10..dc37d9b 100644
--- a/job/src/main/java/org/apache/kylin/job/tools/LZOSupportnessChecker.java
+++ b/job/src/main/java/org/apache/kylin/job/tools/LZOSupportnessChecker.java
@@ -34,7 +34,7 @@ public class LZOSupportnessChecker {
             File temp = File.createTempFile("test", ".tmp");
             CompressionTest.main(new String[] { "file://" + temp.getAbsolutePath(), "lzo"
});
         } catch (Exception e) {
-            log.error("Fail to compress file with lzo", e);
+            log.warn("LZO support is disabled. Fail to compress file with lzo: " + e.toString());
             return false;
         }
         return true;


Mime
View raw message