Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2262#discussion_r187312611
--- Diff:
core/src/main/java/org/apache/carbondata/core/readcommitter/LatestFilesReadCommittedScope.java
---
@@ -134,18 +152,29 @@ private String getSegmentID(String
carbonIndexFileName, String indexFilePath) {
getSegmentID(carbonIndexFiles[i].getName(),
carbonIndexFiles[i].getAbsolutePath());
// TODO. During Partition table handling, place Segment File
Name.
List<String> indexList;
+ SegmentLatestTimestampUpdater segmentLatestTimestampUpdater;
if (indexFileStore.get(segId) == null) {
indexList = new ArrayList<>(1);
+ segmentLatestTimestampUpdater =
+ new
SegmentLatestTimestampUpdater(carbonIndexFiles[i].getLastModifiedTime(), 0);
} else {
// Entry is already present.
indexList = indexFileStore.get(segId);
+ segmentLatestTimestampUpdater =
segmentTimestampUpdaterMap.get(segId);
}
indexList.add(carbonIndexFiles[i].getAbsolutePath());
+ if (segmentLatestTimestampUpdater.getSegmentUpdatedTimestamp() <
carbonIndexFiles[i]
+ .getLastModifiedTime()) {
+ segmentLatestTimestampUpdater
+
.setSegmentUpdatedTimestamp(carbonIndexFiles[i].getLastModifiedTime());
+ }
indexFileStore.put(segId, indexList);
+
segmentLatestTimestampUpdater.setCountOfFileInSegment(indexList.size());
+ segmentTimestampUpdaterMap.put(segId,
segmentLatestTimestampUpdater);
--- End diff --
this line move to 159
---