Github user greghogan commented on a diff in the pull request:
https://github.com/apache/flink/pull/2809#discussion_r90312273
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
---
@@ -957,4 +969,65 @@ public void run() {
}
});
}
+
+ //
------------------------------------------------------------------------
+ // pending checkpoints stats metrics
+ //
------------------------------------------------------------------------
+ private class PendingCheckpointStatGauge implements
Gauge<List<PendingCheckpointStats>> {
+
+ @Override
+ public List<PendingCheckpointStats> getValue() {
+ List<PendingCheckpointStats> pendingCheckpointStatsList
= new ArrayList<>();
+
+ for (PendingCheckpoint checkpoint :
pendingCheckpoints.values()) {
+ long checkpointId =
checkpoint.getCheckpointId();
+ long triggerTime =
checkpoint.getCheckpointTimestamp();
+ int numberOfAckTasks =
checkpoint.getNumberOfAcknowledgedTasks();
+ int numberOfNonAckTasks =
checkpoint.getNumberOfNonAcknowledgedTasks();
+
+ // Acknowledged tasks for double check
NonAcknowledged tasks
+ Set<String> ackTasks = new HashSet<>();
+ for (TaskState taskState :
checkpoint.getTaskStates().values()) {
+ JobVertexID jobVertexID =
taskState.getJobVertexID();
+ for (int subtaskId :
taskState.getSubtaskStates().keySet()) {
+ ackTasks.add(jobVertexID + "_"
+ subtaskId);
+ }
+ }
+
+ // Not yet Acknowledged tasks
+ Map<JobVertexID, Set<Integer>> nonAckTasks =
new HashMap<>();
--- End diff --
Can we make use of `PendingCheckpointnotYetAcknowledgedTasks`?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---