kunal642 commented on a change in pull request #3466: [CARBONDATA-3586] [CARBONDATA-3587]:Checking for refresh segments before inserting segments to index server
URL:
https://github.com/apache/carbondata/pull/3466#discussion_r347740965
##########
File path: integration/spark2/src/main/scala/org/apache/carbondata/indexserver/DistributedRDDUtils.scala
##########
@@ -361,23 +362,27 @@ object DistributedRDDUtils {
conf: Configuration,
segmentId: List[String]): Unit = {
if (carbonTable.isTransactionalTable) {
- val readCommittedScope = new TableStatusReadCommittedScope(AbsoluteTableIdentifier.from(
- carbonTable.getTablePath), conf)
- val validSegments: Seq[Segment] = segmentId.map {
- segmentToPrime =>
- val loadDetailsForCurrentSegment = readCommittedScope
- .getSegmentList.find(_.getLoadName.equalsIgnoreCase(segmentToPrime)).get
-
- new Segment(segmentToPrime,
- loadDetailsForCurrentSegment.getSegmentFile,
- readCommittedScope,
- loadDetailsForCurrentSegment)
- }
val indexServerEnabled = CarbonProperties.getInstance().isDistributedPruningEnabled(
carbonTable.getDatabaseName, carbonTable.getTableName)
val prePrimingEnabled = CarbonProperties.getInstance().isIndexServerPrePrimingEnabled
if (indexServerEnabled && prePrimingEnabled) {
LOGGER.info(s" Loading segments for the table: ${ carbonTable.getTableName } in the cache")
+ val readCommittedScope = new TableStatusReadCommittedScope(AbsoluteTableIdentifier.from(
+ carbonTable.getTablePath), conf)
+ val validSegments: Seq[Segment] = segmentId.map {
+ segmentToPrime =>
+ val loadDetailsForCurrentSegment = readCommittedScope
+ .getSegmentList.find(_.getLoadName.equalsIgnoreCase(segmentToPrime)).get
+
+ new Segment(segmentToPrime,
+ loadDetailsForCurrentSegment.getSegmentFile,
+ readCommittedScope,
+ loadDetailsForCurrentSegment)
+ }
+ val updateStatusManager =
+ new SegmentUpdateStatusManager(carbonTable, readCommittedScope.getSegmentList)
+ DataMapStoreManager.getInstance
Review comment:
add a commnent
----------------------------------------------------------------
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