kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaofeng...@apache.org
Subject kylin git commit: KYLIN-2944 HLLCSerializer, RawSerializer, PercentileSerializer returns shared object in serialize
Date Wed, 18 Oct 2017 01:14:43 GMT
Repository: kylin
Updated Branches:
  refs/heads/master 8891b1c84 -> 3efa9b4fe


KYLIN-2944 HLLCSerializer, RawSerializer, PercentileSerializer returns shared object in serialize


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

Branch: refs/heads/master
Commit: 3efa9b4fe17623af1d42ba09b389dabef73d789e
Parents: 8891b1c
Author: shaofengshi <shaofengshi@apache.org>
Authored: Tue Oct 17 22:30:42 2017 +0800
Committer: shaofengshi <shaofengshi@apache.org>
Committed: Wed Oct 18 09:14:40 2017 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/kylin/measure/hllc/HLLCSerializer.java   | 2 +-
 .../org/apache/kylin/measure/percentile/PercentileSerializer.java | 2 +-
 .../src/main/java/org/apache/kylin/measure/raw/RawSerializer.java | 3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/3efa9b4f/core-metadata/src/main/java/org/apache/kylin/measure/hllc/HLLCSerializer.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/measure/hllc/HLLCSerializer.java
b/core-metadata/src/main/java/org/apache/kylin/measure/hllc/HLLCSerializer.java
index df0cfaf..ddf8281 100644
--- a/core-metadata/src/main/java/org/apache/kylin/measure/hllc/HLLCSerializer.java
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/hllc/HLLCSerializer.java
@@ -56,7 +56,7 @@ public class HLLCSerializer extends DataTypeSerializer<HLLCounter>
{
 
     @Override
     public HLLCounter deserialize(ByteBuffer in) {
-        HLLCounter hllc = current();
+        HLLCounter hllc = new HLLCounter(precision);
         try {
             hllc.readRegisters(in);
         } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/kylin/blob/3efa9b4f/core-metadata/src/main/java/org/apache/kylin/measure/percentile/PercentileSerializer.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/measure/percentile/PercentileSerializer.java
b/core-metadata/src/main/java/org/apache/kylin/measure/percentile/PercentileSerializer.java
index d7e4204..35230a2 100644
--- a/core-metadata/src/main/java/org/apache/kylin/measure/percentile/PercentileSerializer.java
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/percentile/PercentileSerializer.java
@@ -68,7 +68,7 @@ public class PercentileSerializer extends DataTypeSerializer<PercentileCounter>
 
     @Override
     public PercentileCounter deserialize(ByteBuffer in) {
-        PercentileCounter counter = current();
+        PercentileCounter counter = new PercentileCounter(compression);
         counter.readRegisters(in);
         return counter;
     }

http://git-wip-us.apache.org/repos/asf/kylin/blob/3efa9b4f/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawSerializer.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawSerializer.java b/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawSerializer.java
index 68a0273..ea3f376 100644
--- a/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawSerializer.java
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawSerializer.java
@@ -90,8 +90,7 @@ public class RawSerializer extends DataTypeSerializer<List<ByteArray>>
{
 
     @Override
     public List<ByteArray> deserialize(ByteBuffer in) {
-        List<ByteArray> values = current();
-        values.clear();
+        List<ByteArray> values = new ArrayList<>();
         int size = BytesUtil.readVInt(in);
         if (size >= 0) {
             for (int i = 0; i < size; i++) {


Mime
View raw message