Github user GJL commented on a diff in the pull request:
https://github.com/apache/flink/pull/5236#discussion_r159465985
--- Diff:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/HeapInternalTimerService.java
---
@@ -442,23 +458,15 @@ public int numEventTimeTimers() {
}
public int numProcessingTimeTimers(N namespace) {
- int count = 0;
- for (InternalTimer<K, N> timer : processingTimeTimersQueue) {
- if (timer.getNamespace().equals(namespace)) {
- count++;
- }
- }
- return count;
+ return
processingTimeNumberTimers.column(namespace).keySet().stream()
+ .mapToInt(k ->
processingTimeNumberTimers.get(k, namespace))
+ .sum();
}
public int numEventTimeTimers(N namespace) {
--- End diff --
`@Override` annotation is missing
---