wwj6591812 commented on code in PR #4545:
URL: https://github.com/apache/paimon/pull/4545#discussion_r1856015083
##########
paimon-core/src/main/java/org/apache/paimon/operation/LocalOrphanFilesClean.java:
##########
@@ -87,16 +90,27 @@ public LocalOrphanFilesClean(
table.coreOptions().deleteFileThreadNum(),
"ORPHAN_FILES_CLEAN");
}
- public List<Path> clean() throws IOException, ExecutionException,
InterruptedException {
+ public CleanOrphanFilesResult clean()
+ throws IOException, ExecutionException, InterruptedException {
List<String> branches = validBranches();
// specially handle to clear snapshot dir
- cleanSnapshotDir(branches, deleteFiles::add);
+ cleanSnapshotDir(
+ branches,
+ deleteFiles::add,
+ p -> {
+ try {
+
deletedFilesSizeInBytes.addAndGet(fileIO.getFileSize(p));
Review Comment:
OK, Good idea.
I will have a try.
Thx
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]