Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/2451#discussion_r77337149
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/rpc/resourcemanager/ResourceManager.java
---
@@ -53,14 +56,23 @@
*/
public class ResourceManager extends RpcEndpoint<ResourceManagerGateway> {
private final Map<JobMasterGateway, InstanceID> jobMasterGateways;
+
+ /** ResourceID and TaskExecutorGateway mapping relationship of
registered taskExecutors */
+ private final Map<ResourceID, TaskExecutorGateway>
startedTaskExecutorGateways;
+
+ /** TaskExecutorGateway and InstanceId mapping relationship of
registered taskExecutors */
+ private final Map<TaskExecutorGateway, InstanceID> taskExecutorGateways;
--- End diff --
Wouldn't it make sense to group the `TaskExecutorGateway` and the
`InstanceID` into a `TaskExecutorRegistration` class which is stored under the
resource ID? Then we would get rid of a lookup when accessing the `InstanceID`
given the resource ID.
---
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.
---