[GitHub] [carbondata] jackylk opened a new pull request #3672: [WIP] Support column chunk cache in reader

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] ajantha-bhat commented on a change in pull request #3672: [CRBONDATA-3746] Support column chunk cache in reader

GitBox
ajantha-bhat commented on a change in pull request #3672: [CRBONDATA-3746] Support column chunk cache in reader
URL: https://github.com/apache/carbondata/pull/3672#discussion_r394877982
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/datastore/block/TableBlockInfo.java
 ##########
 @@ -105,6 +110,14 @@ public int compare(Distributable o1, Distributable o2) {
   public TableBlockInfo(String filePath, long blockOffset, String segmentId,
       String[] locations, long blockLength, ColumnarFormatVersion version,
       String[] deletedDeltaFilePath) {
+    this(null, filePath, blockOffset, segmentId,
 
 Review comment:
   Need to remove this constructor ? Because if somebody don't set table id. Cache logic may go wrong ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] ajantha-bhat commented on a change in pull request #3672: [CRBONDATA-3746] Support column chunk cache in reader

GitBox
In reply to this post by GitBox
ajantha-bhat commented on a change in pull request #3672: [CRBONDATA-3746] Support column chunk cache in reader
URL: https://github.com/apache/carbondata/pull/3672#discussion_r394878772
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
 ##########
 @@ -491,6 +491,12 @@ private CarbonCommonConstants() {
   // default blocklet size value in MB
   public static final String TABLE_BLOCKLET_SIZE_DEFAULT = "64";
 
+  // table property to enable column chunk data cache in reader
+  public static final String COLUMN_CACHE_ENABLED = "column_cache_enable";
 
 Review comment:
   Need to update the new table property in document

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] ajantha-bhat commented on a change in pull request #3672: [CRBONDATA-3746] Support column chunk cache in reader

GitBox
In reply to this post by GitBox
ajantha-bhat commented on a change in pull request #3672: [CRBONDATA-3746] Support column chunk cache in reader
URL: https://github.com/apache/carbondata/pull/3672#discussion_r394884153
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/datastore/chunk/AbstractRawColumnChunk.java
 ##########
 @@ -26,6 +26,14 @@
  */
 public abstract class AbstractRawColumnChunk {
 
+  /**
+   * Indicating weather this object is cached in
 
 Review comment:
   * whether

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] Indhumathi27 commented on a change in pull request #3672: [CRBONDATA-3746] Support column chunk cache in reader

GitBox
In reply to this post by GitBox
Indhumathi27 commented on a change in pull request #3672: [CRBONDATA-3746] Support column chunk cache in reader
URL: https://github.com/apache/carbondata/pull/3672#discussion_r394937107
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataRefNode.java
 ##########
 @@ -133,35 +139,107 @@ public short blockletIndex() {
   }
 
   @Override
-  public DimensionRawColumnChunk[] readDimensionChunks(FileReader fileReader, int[][] blockIndexes)
+  public DimensionRawColumnChunk[] readDimensionChunks(FileReader fileReader, int[][] columnIndexes)
       throws IOException {
-    DimensionColumnChunkReader dimensionChunksReader = getDimensionColumnChunkReader(fileReader);
-    return dimensionChunksReader.readRawDimensionChunks(fileReader, blockIndexes);
+    TableBlockInfo blockInfo = blockInfos.get(index);
+    if (ColumnChunkCache.isEnabledForTable(tableId)) {
+      DimensionRawColumnChunk[] chunks = new DimensionRawColumnChunk[
+          blockInfo.getDetailInfo().getBlockletInfo().getDimensionChunkOffsets().size()];
+      for (int[] columnIndex : columnIndexes) {
+        int columnIndexStart = columnIndex[0];
+        int columnIndexEnd = columnIndex[1];
+        for (int j = columnIndexStart; j <= columnIndexEnd; j++) {
+          ColumnChunkCache.CacheKey key = new ColumnChunkCache.CacheKey(
 
 Review comment:
   Can extract getting cacheKey to a method. Seems, it is used in more places

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
12