Github user GJL commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5881#discussion_r183242992
  
    --- 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 --
    
    A concurrent map is not needed because state modifications are performed in 
the main thread of the RPC framework.
    
    It's enough to use a `HashMap`:
    ```
    private final Map<ResourceID, Container> 
pendingContainersExpectedToRegister = new HashMap<>();
    ```



---

Reply via email to