Posted by
GitBox on
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-ShreelekhyaG-opened-a-new-pull-request-3988-WIP-Clean-index-files-when-clean-filesd-tp102150p107722.html
ShreelekhyaG commented on a change in pull request #3988:
URL:
https://github.com/apache/carbondata/pull/3988#discussion_r616422603##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/util/SecondaryIndexUtil.scala
##########
@@ -353,16 +342,38 @@ object SecondaryIndexUtil {
}
}
+ /**
+ * This method returns the list of index/merge index files for a segment in carbonTable.
+ */
+ @throws[IOException]
+ private def getIndexFilesListForSegment(segment: Segment, tablePath: String): util.Set[String] = {
+ var indexFiles : util.Set[String] = new util.HashSet[String]
+ val segmentFileStore = new SegmentFileStore(tablePath,
+ segment.getSegmentFileName)
+ val segmentPath = CarbonTablePath.getSegmentPath(tablePath, segment.getSegmentNo)
+ if (segmentFileStore.getSegmentFile == null) {
+ indexFiles = new SegmentIndexFileStore()
+ .getMergeOrIndexFilesFromSegment(segmentPath).keySet
+ }
+ else {
Review comment:
Done
--
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]