[GitHub] [carbondata] akashrn5 commented on a change in pull request #3386: [WIP] : Pre-priming cache

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] akashrn5 commented on a change in pull request #3386: [WIP] : Pre-priming cache

GitBox
akashrn5 commented on a change in pull request #3386: [WIP] : Pre-priming cache
URL: https://github.com/apache/carbondata/pull/3386#discussion_r326521612
 
 

 ##########
 File path: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala
 ##########
 @@ -866,6 +867,37 @@ case class CarbonLoadDataCommand(
           case _ =>
         }
       }
+
+      // Prepriming for Partition table here
+      val indexServerEnabled = CarbonProperties.getInstance().isDistributedPruningEnabled(
+        carbonLoadModel.getDatabaseName, carbonLoadModel.getTableName)
+      val prePrimingEnabled = CarbonProperties.getInstance().isIndexServerPrePrimingEnabled()
+      if (indexServerEnabled && prePrimingEnabled) {
+        var readCommittedScope = new TableStatusReadCommittedScope(AbsoluteTableIdentifier.from(
+          carbonLoadModel.getTablePath), hadoopConf)
+        if (carbonLoadModel.getSegmentId != null) {
+          var loadDetailsForCurrentSegment = readCommittedScope
+            .getSegmentList
+            .find(_.getLoadName.equalsIgnoreCase(carbonLoadModel.getSegmentId))
+            .get
+
+          val segmentToWrite: Segment = new Segment(carbonLoadModel.getSegmentId,
+            loadDetailsForCurrentSegment.getSegmentFile,
+            readCommittedScope,
+            loadDetailsForCurrentSegment)
+
+          val invalidSegment: List[Nothing] = List()
+          LOGGER.info(s"Adding Segments to the Cache for Partition Table")
 
 Review comment:
   correct the log message as per old comment

----------------------------------------------------------------
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