ajantha-bhat commented on a change in pull request #3705: [CARBONDATA-3771]
Fixed date filter issue and use hive constants instead of hard-coded …
URL: https://github.com/apache/carbondata/pull/3705#discussion_r407397053
##########
File path:
core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java
##########
@@ -320,6 +321,28 @@ public static boolean writeSegmentFileForOthers(
return false;
}
+ public static void mergeIndexAndWriteSegmentFile(CarbonTable carbonTable,
String segmentId,
+ String UUID) {
+ String tablePath = carbonTable.getTablePath();
+ String segmentPath = CarbonTablePath.getSegmentPath(tablePath, segmentId);
+ CarbonFile segmentFolder = FileFactory.getCarbonFile(segmentPath);
+ CarbonFile[] indexFiles = segmentFolder.listFiles(new CarbonFileFilter() {
+ @Override
+ public boolean accept(CarbonFile file) {
+ return (file.getName().endsWith(CarbonTablePath.INDEX_FILE_EXT) ||
file.getName()
+ .endsWith(CarbonTablePath.MERGE_INDEX_FILE_EXT));
+ }
+ });
+ String segmentFileName = genSegmentFileName(segmentId, UUID) +
CarbonTablePath.SEGMENT_EXT;
+ try {
+ SegmentFileStore sfs = new SegmentFileStore(tablePath, segmentFileName);
Review comment:
once SegmentFileStore is made, call `sfs.getIndexFiles()`, we can remove
list files of line 329
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services