Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/5699#discussion_r175726725
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/heartbeat/HeartbeatManagerImpl.java
---
@@ -106,8 +107,8 @@ Executor getExecutor() {
return heartbeatListener;
}
- Collection<HeartbeatManagerImpl.HeartbeatMonitor<O>>
getHeartbeatTargets() {
- return heartbeatTargets.values();
+ Collection<Map.Entry<ResourceID, HeartbeatMonitor<O>>>
getHeartbeatTargets() {
--- End diff --
What about adding a `getTargetID()` to the `HeartbeatMonitor`? Then we
would not have to expose, even though it is an internal method, that we use a
`Map` to store the heartbeat targets. We could then keep the return type
`Collection<HeartbeatMonitor>`.
---