Aitozi commented on code in PR #4391:
URL: https://github.com/apache/paimon/pull/4391#discussion_r1820037510
##########
paimon-core/src/main/java/org/apache/paimon/operation/metrics/CompactionMetrics.java:
##########
@@ -41,13 +42,19 @@ public class CompactionMetrics {
public static final String AVG_LEVEL0_FILE_COUNT = "avgLevel0FileCount";
public static final String COMPACTION_THREAD_BUSY = "compactionThreadBusy";
public static final String AVG_COMPACTION_TIME = "avgCompactionTime";
+ public static final String COMPACTIONS_COMPLETED_COUNT =
"compactionsCompletedCount";
Review Comment:
How about `compactionCompletedCount` to keep consistent with
`compactionThreadBusy`
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/compact/UnawareBucketCompactor.java:
##########
@@ -100,14 +100,41 @@ public void processElement(UnawareAppendCompactionTask
task) throws Exception {
metricsReporter.reportCompactionTime(
System.currentTimeMillis()
-
startMillis);
+ metricsReporter
+
.increaseCompactionsCompletedCount();
}
},
LOG);
return commitMessage;
+ } catch (Exception e) {
+ MetricUtils.safeCall(
+
this::increaseCompactionsFailedCount, LOG);
Review Comment:
when there is a exception, the job will restart and this metric will reset
to 0, do we have to count this?
--
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]