kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mahong...@apache.org
Subject [3/3] kylin git commit: KYLIN-1924 Region server metrics: replace int type for long type for scanned row count
Date Thu, 28 Jul 2016 01:59:42 GMT
KYLIN-1924 Region server metrics: replace int type for long type for scanned row count


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

Branch: refs/heads/beforepomupdate
Commit: a44ada7957ae2be80ab3c9b3653cffac6369741d
Parents: 032b242
Author: Hongbin Ma <mahongbin@apache.org>
Authored: Thu Jul 28 09:59:09 2016 +0800
Committer: Hongbin Ma <mahongbin@apache.org>
Committed: Thu Jul 28 09:59:09 2016 +0800

----------------------------------------------------------------------
 .../cube/inmemcubing/ConcurrentDiskStore.java   |    4 +-
 .../cube/inmemcubing/InMemCubeBuilder.java      |    4 +-
 .../kylin/cube/inmemcubing/MemDiskStore.java    |    2 +-
 .../apache/kylin/gridtable/EmptyGTScanner.java  |    6 +-
 .../kylin/gridtable/GTAggregateScanner.java     |    2 +-
 .../apache/kylin/gridtable/GTFilterScanner.java |    2 +-
 .../apache/kylin/gridtable/GTScanRequest.java   |    2 +-
 .../org/apache/kylin/gridtable/IGTScanner.java  |    2 +-
 .../apache/kylin/gridtable/ScannerWorker.java   |    2 +-
 .../benchmark/SortedGTRecordGenerator.java      |    2 +-
 .../gridtable/memstore/GTSimpleMemStore.java    |    4 +-
 .../gridtable/AggregationCacheSpillTest.java    |    4 +-
 .../storage/gtrecord/CubeSegmentScanner.java    |    2 +-
 .../storage/hbase/cube/SimpleHBaseStore.java    |    2 +-
 .../hbase/cube/v2/CubeHBaseEndpointRPC.java     |   14 +-
 .../storage/hbase/cube/v2/CubeHBaseScanRPC.java |    6 +-
 .../hbase/cube/v2/HBaseReadonlyStore.java       |    2 +-
 .../endpoint/generated/CubeVisitProtos.java     | 8629 +++++++++---------
 .../endpoint/protobuf/CubeVisit.proto           |    4 +-
 19 files changed, 4408 insertions(+), 4287 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/ConcurrentDiskStore.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/ConcurrentDiskStore.java
b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/ConcurrentDiskStore.java
index d5d502c..2af8bce 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/ConcurrentDiskStore.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/ConcurrentDiskStore.java
@@ -154,7 +154,7 @@ public class ConcurrentDiskStore implements IGTStore, Closeable {
         final DataInputStream din;
         long fileLen;
         long readOffset;
-        int count;
+        long count;
 
         Reader(long startOffset) throws IOException {
             this.fileLen = diskFile.length();
@@ -265,7 +265,7 @@ public class ConcurrentDiskStore implements IGTStore, Closeable {
         }
 
         @Override
-        public int getScannedRowCount() {
+        public long getScannedRowCount() {
             return count;
         }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
index fd9d03e..e12e815 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
@@ -558,8 +558,8 @@ public class InMemCubeBuilder extends AbstractInMemCubeBuilder {
         }
 
         @Override
-        public int getScannedRowCount() {
-            return 0;
+        public long getScannedRowCount() {
+            return 0L;
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java
index 40a15ee..d8cd814 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java
@@ -278,7 +278,7 @@ public class MemDiskStore implements IGTStore, Closeable {
         }
 
         @Override
-        public int getScannedRowCount() {
+        public long getScannedRowCount() {
             return count;
         }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/core-cube/src/main/java/org/apache/kylin/gridtable/EmptyGTScanner.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/EmptyGTScanner.java b/core-cube/src/main/java/org/apache/kylin/gridtable/EmptyGTScanner.java
index a6b6c47..01d31f0 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/EmptyGTScanner.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/EmptyGTScanner.java
@@ -22,9 +22,9 @@ import java.io.IOException;
 import java.util.Iterator;
 
 public class EmptyGTScanner implements IGTScanner {
-    private int reportScannedRowCount;
+    private long reportScannedRowCount;
 
-    public EmptyGTScanner(int reportScannedRowCount) {
+    public EmptyGTScanner(long reportScannedRowCount) {
         this.reportScannedRowCount = reportScannedRowCount;
     }
 
@@ -34,7 +34,7 @@ public class EmptyGTScanner implements IGTScanner {
     }
 
     @Override
-    public int getScannedRowCount() {
+    public long getScannedRowCount() {
         return reportScannedRowCount;
     }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java b/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java
index 103c8e5..2a83d03 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java
@@ -119,7 +119,7 @@ public class GTAggregateScanner implements IGTScanner {
     }
 
     @Override
-    public int getScannedRowCount() {
+    public long getScannedRowCount() {
         return inputScanner.getScannedRowCount();
     }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/core-cube/src/main/java/org/apache/kylin/gridtable/GTFilterScanner.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/GTFilterScanner.java b/core-cube/src/main/java/org/apache/kylin/gridtable/GTFilterScanner.java
index a5fa808..31a9599 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTFilterScanner.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTFilterScanner.java
@@ -63,7 +63,7 @@ public class GTFilterScanner implements IGTScanner {
     }
 
     @Override
-    public int getScannedRowCount() {
+    public long getScannedRowCount() {
         return inputScanner.getScannedRowCount();
     }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java
index d1bd1b3..0ce6b4c 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java
@@ -164,7 +164,7 @@ public class GTScanRequest {
             }
 
             if (!doAggr) {//Skip reading this section if you're not profiling! 
-                int scanned = result.getScannedRowCount();
+                long scanned = result.getScannedRowCount();
                 lookAndForget(result);
                 return new EmptyGTScanner(scanned);
             }

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/core-cube/src/main/java/org/apache/kylin/gridtable/IGTScanner.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/IGTScanner.java b/core-cube/src/main/java/org/apache/kylin/gridtable/IGTScanner.java
index c0da569..980787b 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/IGTScanner.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/IGTScanner.java
@@ -24,6 +24,6 @@ public interface IGTScanner extends Iterable<GTRecord>, Closeable
{
 
     GTInfo getInfo();
 
-    int getScannedRowCount();
+    long getScannedRowCount();
 
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/core-cube/src/main/java/org/apache/kylin/gridtable/ScannerWorker.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/ScannerWorker.java b/core-cube/src/main/java/org/apache/kylin/gridtable/ScannerWorker.java
index 9c3b391..5be91be 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/ScannerWorker.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/ScannerWorker.java
@@ -59,7 +59,7 @@ public class ScannerWorker {
         internal.close();
     }
 
-    public int getScannedRowCount() {
+    public long getScannedRowCount() {
         return internal.getScannedRowCount();
     }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/core-cube/src/main/java/org/apache/kylin/gridtable/benchmark/SortedGTRecordGenerator.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/benchmark/SortedGTRecordGenerator.java
b/core-cube/src/main/java/org/apache/kylin/gridtable/benchmark/SortedGTRecordGenerator.java
index 094acec..9c839bb 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/benchmark/SortedGTRecordGenerator.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/benchmark/SortedGTRecordGenerator.java
@@ -186,7 +186,7 @@ public class SortedGTRecordGenerator {
         }
 
         @Override
-        public int getScannedRowCount() {
+        public long getScannedRowCount() {
             return counter;
         }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/core-cube/src/main/java/org/apache/kylin/gridtable/memstore/GTSimpleMemStore.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/memstore/GTSimpleMemStore.java
b/core-cube/src/main/java/org/apache/kylin/gridtable/memstore/GTSimpleMemStore.java
index ec5d22d..f9f370b 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/memstore/GTSimpleMemStore.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/memstore/GTSimpleMemStore.java
@@ -98,7 +98,7 @@ public class GTSimpleMemStore implements IGTStore {
     public IGTScanner scan(GTScanRequest scanRequest) {
 
         return new IGTScanner() {
-            int count;
+            long count;
 
             @Override
             public GTInfo getInfo() {
@@ -106,7 +106,7 @@ public class GTSimpleMemStore implements IGTStore {
             }
 
             @Override
-            public int getScannedRowCount() {
+            public long getScannedRowCount() {
                 return count;
             }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheSpillTest.java
----------------------------------------------------------------------
diff --git a/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheSpillTest.java
b/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheSpillTest.java
index c92e1aa..4160f86 100644
--- a/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheSpillTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheSpillTest.java
@@ -70,7 +70,7 @@ public class AggregationCacheSpillTest extends LocalFileMetadataTestCase
{
             }
 
             @Override
-            public int getScannedRowCount() {
+            public long getScannedRowCount() {
                 throw new UnsupportedOperationException();
             }
 
@@ -112,7 +112,7 @@ public class AggregationCacheSpillTest extends LocalFileMetadataTestCase
{
             }
 
             @Override
-            public int getScannedRowCount() {
+            public long getScannedRowCount() {
                 throw new UnsupportedOperationException();
             }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/CubeSegmentScanner.java
----------------------------------------------------------------------
diff --git a/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/CubeSegmentScanner.java
b/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/CubeSegmentScanner.java
index f539179..21cebc1 100644
--- a/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/CubeSegmentScanner.java
+++ b/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/CubeSegmentScanner.java
@@ -93,7 +93,7 @@ public class CubeSegmentScanner implements IGTScanner {
     }
 
     @Override
-    public int getScannedRowCount() {
+    public long getScannedRowCount() {
         return scanner.getScannedRowCount();
     }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/SimpleHBaseStore.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/SimpleHBaseStore.java
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/SimpleHBaseStore.java
index 2462873..b141190 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/SimpleHBaseStore.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/SimpleHBaseStore.java
@@ -207,7 +207,7 @@ public class SimpleHBaseStore implements IGTStore {
         }
 
         @Override
-        public int getScannedRowCount() {
+        public long getScannedRowCount() {
             return count;
         }
     }

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
index 163226b..1cebdea 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
@@ -27,7 +27,7 @@ import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
 import java.util.zip.DataFormatException;
 
 import javax.annotation.Nullable;
@@ -60,10 +60,10 @@ import org.apache.kylin.storage.hbase.HBaseConnection;
 import org.apache.kylin.storage.hbase.common.coprocessor.CoprocessorBehavior;
 import org.apache.kylin.storage.hbase.cube.v2.coprocessor.endpoint.generated.CubeVisitProtos;
 import org.apache.kylin.storage.hbase.cube.v2.coprocessor.endpoint.generated.CubeVisitProtos.CubeVisitRequest;
-import org.apache.kylin.storage.hbase.cube.v2.coprocessor.endpoint.generated.CubeVisitProtos.CubeVisitRequest.IntList;
 import org.apache.kylin.storage.hbase.cube.v2.coprocessor.endpoint.generated.CubeVisitProtos.CubeVisitResponse;
-import org.apache.kylin.storage.hbase.cube.v2.coprocessor.endpoint.generated.CubeVisitProtos.CubeVisitResponse.Stats;
 import org.apache.kylin.storage.hbase.cube.v2.coprocessor.endpoint.generated.CubeVisitProtos.CubeVisitService;
+import org.apache.kylin.storage.hbase.cube.v2.coprocessor.endpoint.generated.CubeVisitProtos.CubeVisitRequest.IntList;
+import org.apache.kylin.storage.hbase.cube.v2.coprocessor.endpoint.generated.CubeVisitProtos.CubeVisitResponse.Stats;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -165,9 +165,9 @@ public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
         private GTInfo info;
         private Iterator<byte[]> blocks;
         private ImmutableBitSet columns;
-        private int totalScannedCount;
+        private long totalScannedCount;
 
-        public EndpointResultsAsGTScanner(GTInfo info, Iterator<byte[]> blocks, ImmutableBitSet
columns, int totalScannedCount) {
+        public EndpointResultsAsGTScanner(GTInfo info, Iterator<byte[]> blocks, ImmutableBitSet
columns, long totalScannedCount) {
             this.info = info;
             this.blocks = blocks;
             this.columns = columns;
@@ -180,7 +180,7 @@ public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
         }
 
         @Override
-        public int getScannedRowCount() {
+        public long getScannedRowCount() {
             return totalScannedCount;
         }
 
@@ -330,7 +330,7 @@ public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
 
         logger.debug("Submitting rpc to {} shards starting from shard {}, scan range count
{}", shardNum, cuboidBaseShard, rawScans.size());
 
-        final AtomicInteger totalScannedCount = new AtomicInteger(0);
+        final AtomicLong totalScannedCount = new AtomicLong(0);
         final ExpectedSizeIterator epResultItr = new ExpectedSizeIterator(shardNum);
 
         // KylinConfig: use env instance instead of CubeSegment, because KylinConfig will
share among queries

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseScanRPC.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseScanRPC.java
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseScanRPC.java
index dcedf76..238939c 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseScanRPC.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseScanRPC.java
@@ -110,8 +110,8 @@ public class CubeHBaseScanRPC extends CubeHBaseRPC {
             }
 
             @Override
-            public int getScannedRowCount() {
-                int sum = 0;
+            public long getScannedRowCount() {
+                long sum = 0;
                 sum += scanner.getScannedRowCount();
                 return sum;
             }
@@ -226,7 +226,7 @@ public class CubeHBaseScanRPC extends CubeHBaseRPC {
             }
 
             @Override
-            public int getScannedRowCount() {
+            public long getScannedRowCount() {
                 return decorateScanner.getScannedRowCount();
             }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/a44ada79/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/HBaseReadonlyStore.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/HBaseReadonlyStore.java
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/HBaseReadonlyStore.java
index 850b3d9..4b9b4fa 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/HBaseReadonlyStore.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/HBaseReadonlyStore.java
@@ -141,7 +141,7 @@ public class HBaseReadonlyStore implements IGTStore {
             }
 
             @Override
-            public int getScannedRowCount() {
+            public long getScannedRowCount() {
                 return count;
             }
         };


Mime
View raw message