Posted by
GitBox on
Dec 28, 2020; 2:02pm
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-vikramahuja1001-opened-a-new-pull-request-4066-WIP-fixed-clean-files-listener-tp105146p105147.html
akashrn5 commented on a change in pull request #4066:
URL:
https://github.com/apache/carbondata/pull/4066#discussion_r549358345##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/CleanFilesPostEventListener.scala
##########
@@ -133,16 +134,16 @@ class CleanFilesPostEventListener extends OperationEventListener with Logging {
val carbonFile = FileFactory
.getCarbonFile(CarbonTablePath
.getSegmentPath(indexTable.getTablePath, detail.getLoadName))
+ LOGGER.info(s"Deleting segment folder: ${carbonFile.getName}")
CarbonUtil.deleteFoldersAndFiles(carbonFile)
}
unnecessarySegmentsOfSI.foreach { detail =>
detail.setSegmentStatus(segToStatusMap(detail.getLoadName))
detail.setVisibility("false")
}
-
SegmentStatusManager.writeLoadDetailsIntoFile(
- indexTable.getMetadataPath + CarbonTablePath.TABLE_STATUS_FILE,
- unnecessarySegmentsOfSI.toArray)
+ indexTable.getMetadataPath + CarbonCommonConstants.FILE_SEPARATOR +
+ CarbonTablePath.TABLE_STATUS_FILE, indexTableMetadataDetails.toArray)
Review comment:
here, if you send `indexTableMetadataDetails` again, it will have same status, so you need to change the status and visibility if `unnecessarySegmentsOfSI` inside `indexTableMetadataDetails` and then write
----------------------------------------------------------------
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]