kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lid...@apache.org
Subject [24/50] [abbrv] kylin git commit: KYLIN-2353 minor code review
Date Thu, 12 Jan 2017 04:05:27 GMT
KYLIN-2353 minor code review


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

Branch: refs/heads/master-hbase1.x
Commit: 56daf6d592ae454b3bca97c4a7a948781485befa
Parents: 731a53a
Author: Yang Li <liyang@apache.org>
Authored: Sat Jan 7 19:30:27 2017 +0800
Committer: Yang Li <liyang@apache.org>
Committed: Sat Jan 7 19:30:27 2017 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/measure/bitmap/BitmapCounter.java    | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/56daf6d5/core-metadata/src/main/java/org/apache/kylin/measure/bitmap/BitmapCounter.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/measure/bitmap/BitmapCounter.java
b/core-metadata/src/main/java/org/apache/kylin/measure/bitmap/BitmapCounter.java
index a18ac4a..a632b0d 100644
--- a/core-metadata/src/main/java/org/apache/kylin/measure/bitmap/BitmapCounter.java
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/bitmap/BitmapCounter.java
@@ -51,7 +51,9 @@ public class BitmapCounter implements Comparable<BitmapCounter> {
         }
 
         if (buffer != null) {
+            @SuppressWarnings("unused")
             int version = buffer.getInt();
+            @SuppressWarnings("unused")
             int size = buffer.getInt();
             count = buffer.getInt();
 
@@ -79,7 +81,7 @@ public class BitmapCounter implements Comparable<BitmapCounter> {
 
     public void add(int value) {
         getBitmap().add(value);
-        count = getBitmap().getCardinality();
+        count = null;
     }
 
     public void add(byte[] value) {
@@ -103,12 +105,12 @@ public class BitmapCounter implements Comparable<BitmapCounter>
{
 
     public void merge(BitmapCounter another) {
         getBitmap().or(another.getBitmap());
-        count = getBitmap().getCardinality();
+        count = null;
     }
 
     public void intersect(BitmapCounter another) {
         getBitmap().and(another.getBitmap());
-        count = getBitmap().getCardinality();
+        count = null;
     }
 
     public int getCount() {
@@ -148,7 +150,6 @@ public class BitmapCounter implements Comparable<BitmapCounter>
{
 
         // keep forward compatibility
         if (version == VERSION) {
-            @SuppressWarnings("unused")
             int size = in.getInt();
             count = in.getInt();
             in.position(mark);
@@ -258,4 +259,5 @@ public class BitmapCounter implements Comparable<BitmapCounter>
{
             return len;
         }
     }
+    
 }


Mime
View raw message