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 2015/03/14 01:01:29 UTC

[16/50] incubator-kylin git commit: GTStore interface updated for row block index

GTStore interface updated for row block index


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

Branch: refs/heads/streaming
Commit: 9ec330a1fd7214b06eff40de719c52bd0652d8e1
Parents: cebff40
Author: Li, Yang <ya...@ebay.com>
Authored: Mon Mar 9 14:49:34 2015 +0800
Committer: Li, Yang <ya...@ebay.com>
Committed: Mon Mar 9 14:49:34 2015 +0800

----------------------------------------------------------------------
 .../kylin/storage/gridtable/GTBuilder.java       |  4 ++--
 .../kylin/storage/gridtable/GTRowBlock.java      |  1 +
 .../kylin/storage/gridtable/GTRowBlockIndex.java |  5 +++++
 .../apache/kylin/storage/gridtable/GTStore.java  | 19 +++++++++++++++----
 4 files changed, 23 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/9ec330a1/storage/src/main/java/org/apache/kylin/storage/gridtable/GTBuilder.java
----------------------------------------------------------------------
diff --git a/storage/src/main/java/org/apache/kylin/storage/gridtable/GTBuilder.java b/storage/src/main/java/org/apache/kylin/storage/gridtable/GTBuilder.java
index 9e29b52..0083b86 100644
--- a/storage/src/main/java/org/apache/kylin/storage/gridtable/GTBuilder.java
+++ b/storage/src/main/java/org/apache/kylin/storage/gridtable/GTBuilder.java
@@ -5,12 +5,12 @@ import java.io.Flushable;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 
-import org.apache.kylin.storage.gridtable.GTStore.GTBlockWriter;
+import org.apache.kylin.storage.gridtable.GTStore.GTWriter;
 
 public class GTBuilder implements Closeable, Flushable {
 
     final private GTInfo info;
-    final private GTBlockWriter writer;
+    final private GTWriter writer;
     
     private GTRowBlock block;
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/9ec330a1/storage/src/main/java/org/apache/kylin/storage/gridtable/GTRowBlock.java
----------------------------------------------------------------------
diff --git a/storage/src/main/java/org/apache/kylin/storage/gridtable/GTRowBlock.java b/storage/src/main/java/org/apache/kylin/storage/gridtable/GTRowBlock.java
index 4526ef4..6db08ab 100644
--- a/storage/src/main/java/org/apache/kylin/storage/gridtable/GTRowBlock.java
+++ b/storage/src/main/java/org/apache/kylin/storage/gridtable/GTRowBlock.java
@@ -7,6 +7,7 @@ class GTRowBlock {
     private static final int PRIMARY_KEY_CAPACITY = 2048;
     private static final int CELL_BLOCK_CAPACITY = 128 * 1024;
     
+    int seqId; // 0, 1, 2...
     int nRows;
     ByteBuffer primaryKey; // the primary key of the first row
     ByteBuffer[] cellBlocks; // cells for each column block

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/9ec330a1/storage/src/main/java/org/apache/kylin/storage/gridtable/GTRowBlockIndex.java
----------------------------------------------------------------------
diff --git a/storage/src/main/java/org/apache/kylin/storage/gridtable/GTRowBlockIndex.java b/storage/src/main/java/org/apache/kylin/storage/gridtable/GTRowBlockIndex.java
new file mode 100644
index 0000000..21b0a9a
--- /dev/null
+++ b/storage/src/main/java/org/apache/kylin/storage/gridtable/GTRowBlockIndex.java
@@ -0,0 +1,5 @@
+package org.apache.kylin.storage.gridtable;
+
+public class GTRowBlockIndex {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/9ec330a1/storage/src/main/java/org/apache/kylin/storage/gridtable/GTStore.java
----------------------------------------------------------------------
diff --git a/storage/src/main/java/org/apache/kylin/storage/gridtable/GTStore.java b/storage/src/main/java/org/apache/kylin/storage/gridtable/GTStore.java
index 3ccaa00..b665fd6 100644
--- a/storage/src/main/java/org/apache/kylin/storage/gridtable/GTStore.java
+++ b/storage/src/main/java/org/apache/kylin/storage/gridtable/GTStore.java
@@ -1,5 +1,7 @@
 package org.apache.kylin.storage.gridtable;
 
+import it.uniroma3.mat.extendedset.intset.ConciseSet;
+
 import java.io.Closeable;
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -11,14 +13,23 @@ public interface GTStore {
     
     public String getStorageDescription();
     
-    public GTBlockWriter rebuild(int shard);
+    // ============================================================================
+    
+    public GTWriter rebuild(int shard);
     
-    public GTBlockScanner scan(ByteBuffer pkStart, ByteBuffer pkEndExclusive, int[] colBlocks);
+    public GTScanner scan(ByteBuffer pkStart, ByteBuffer pkEndExclusive, ConciseSet selectedRowBlcoks, int[] selectedColBlocks);
     
-    public interface GTBlockWriter extends Closeable {
+    public interface GTWriter extends Closeable {
         void write(GTRowBlock block) throws IOException;
     }
     
-    public interface GTBlockScanner extends Iterator<GTRowBlock>, Closeable {
+    public interface GTScanner extends Iterator<GTRowBlock>, Closeable {
     }
+    
+    // ============================================================================
+    
+    public void saveRowBlockIndex(int col, GTRowBlockIndex index);
+    
+    public GTRowBlockIndex loadRowBlockIndex(int col);
+    
 }