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

 ##########
 File path: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/mutation/CarbonProjectForUpdateCommand.scala
 ##########
 @@ -169,6 +172,35 @@ private[sql] case class CarbonProjectForUpdateCommand(
           DeleteExecution
             .clearDistributedSegmentCache(carbonTable, segmentsToBeDeleted)(sparkSession)
 
+          // trigger prepriming
+          val prop = CarbonProperties.getInstance
+            .getProperty(CarbonCommonConstants.CARBON_ENABLE_INDEX_SERVER)
+          if (prop != null) {
+            if (prop.toBoolean) {
+              val readCommittedScope = new TableStatusReadCommittedScope(
+                AbsoluteTableIdentifier.from(
+                  carbonTable.getTablePath), FileFactory.getConfiguration)
+              val segment = segmentsToBeDeleted.toArray
+              if (segment.length > 0) {
+                val segmentToWrite = segment(0)
+                segmentToWrite.setReadCommittedScope(readCommittedScope)
+                val invalidList = scala.collection.mutable.MutableList[String]()
+                for (seg <- segment) {
+                  invalidList += seg.getSegmentNo
+                }
+                LOGGER.info(s"Adding Segments to the Cache after Update")
 
 Review comment:
   same as above

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