Posted by
GitBox on
Mar 09, 2021; 10:23am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-vikramahuja1001-opened-a-new-pull-request-4072-WIP-Clean-files-phase2-tp105322p106602.html
vikramahuja1001 commented on a change in pull request #4072:
URL:
https://github.com/apache/carbondata/pull/4072#discussion_r590184901##########
File path: core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java
##########
@@ -1112,11 +1112,15 @@ public static void cleanSegments(CarbonTable table,
cleanSegments(table, details, partitionSpecs, forceDelete);
}
- public static void deleteSegmentFile(String tablePath, Segment segment) throws Exception {
+ public static long deleteSegmentFile(String tablePath, Segment segment) throws Exception {
String segmentFilePath =
CarbonTablePath.getSegmentFilePath(tablePath, segment.getSegmentFileName());
// Deletes the physical segment file
- FileFactory.deleteFile(segmentFilePath);
+ CarbonFile carbonSegmentFile = FileFactory.getCarbonFile(segmentFilePath);
+ long sizeFreed = carbonSegmentFile.getSize();
+ FileFactory.deleteFile(carbonSegmentFile);
Review comment:
changed
----------------------------------------------------------------
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]