dwangatt commented on code in PR #10994:
URL: https://github.com/apache/paimon/pull/10994#discussion_r4581568689


##########
paimon-core/src/main/java/org/apache/paimon/table/ExpireSnapshotsImpl.java:
##########
@@ -538,6 +629,13 @@ private void writeEarliestHint(long earliest) {
         }
     }
 
+    private String progressContext() {

Review Comment:
   This is fixed in this 
[commit](https://github.com/apache/paimon/pull/10994/changes/5c3b86707aac2c6c17d33d037199a071a6504e81)



##########
paimon-core/src/main/java/org/apache/paimon/table/ExpireSnapshotsImpl.java:
##########
@@ -112,13 +113,27 @@ public ExpireSnapshots config(ExpireConfig expireConfig) {
 
     @Override
     public int expire() {
+        try (MaintenanceProgress progress =
+                new MaintenanceProgress(progressContext(), 
"evaluate-retention")) {

Review Comment:
   Fixed in this 
[commit](https://github.com/apache/paimon/pull/10994/changes/3a3c932a34fbb8cabfc0b72307b32263aa50224d)



##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/orphan/FlinkOrphanFilesClean.java:
##########
@@ -283,31 +343,48 @@ public void processElement(
                                             ProcessFunction<String, 
Tuple2<String, Long>>.Context
                                                     ctx,
                                             Collector<Tuple2<String, Long>> 
out) {
-                                        Path dirPath = new Path(dir);
-                                        List<FileStatus> files = 
tryBestListingDirs(dirPath);
-                                        for (FileStatus file : files) {
-                                            if (!file.isDir()
-                                                    && 
!isManagedBlobPack(file.getPath())
-                                                    && oldEnough(file)) {
-                                                out.collect(
-                                                        Tuple2.of(
-                                                                
file.getPath().toString(),
-                                                                
file.getLen()));
-                                            }
-                                        }
-                                        if (files.isEmpty()) {
+                                        try (MaintenanceProgress progress =
+                                                new MaintenanceProgress(

Review Comment:
   Fixed it in 
[commit](https://github.com/apache/paimon/pull/10994/changes/370ae8d5138e91d4fb1328f5258a04140934eda1)



##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/orphan/FlinkOrphanFilesClean.java:
##########
@@ -418,11 +554,28 @@ public void processElement2(
                                         Tuple2<String, Long> fileInfo = 
element.getValue();
                                         String value = fileInfo.f0;
                                         Path path = new Path(value);
+                                        progress.add("files_checked", 1);
                                         if (!used.contains(path.getName())) {
                                             emittedFilesCount++;
                                             emittedFilesLen += fileInfo.f1;
-                                            cleanFile(path);
-                                            LOG.info("Dry clean: {}", path);
+                                            progress.add("candidate_files", 1);
+                                            progress.add("candidate_bytes", 
fileInfo.f1);
+                                            long item = 
progress.startItem(path.toString());
+                                            try {
+                                                cleanFile(path);
+                                            } finally {
+                                                progress.finishItem(item);
+                                            }
+                                            progress.add(
+                                                    dryRun
+                                                            ? "dry_run_files"
+                                                            : 
"delete_calls_completed",
+                                                    1);
+                                            LOG.debug(

Review Comment:
   Fixed



-- 
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]

Reply via email to