Github user sihuazhou commented on a diff in the pull request:
https://github.com/apache/flink/pull/5881#discussion_r183265708
--- Diff:
flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java ---
@@ -114,6 +118,9 @@
private final Map<ResourceProfile, Integer> resourcePriorities = new
HashMap<>();
+ /** The containers that we expected to register with ResourceManager. */
+ private final Map<ResourceID, Container>
pendingContainersExpectedToRegister = new ConcurrentHashMap<>();
--- End diff --
I not sure whether a `HashMap` is enough here, because the
`pendingContainersExpectedToRegister` not only used in the API that driven by
RPC, but also used in some API that related to yarn itself, like the
`onContainersCompleted()`, `onContainersAllocated()`. I made it to concurrent
map also because I notified that `workerNodeMap` is also a concurrent map which
has a similar behavior with `pendingContainersExpectedToRegister`, what do you
think?
---