flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GJL <...@git.apache.org>
Subject [GitHub] flink pull request #5881: [FLINK-9190][yarn] fix YarnResourceManager sometim...
Date Sun, 22 Apr 2018 16:47:54 GMT
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<>();
    ```



---

Mime
View raw message