xintongsong commented on a change in pull request #11248: [FLINK-16299] Release 
containers recovered from previous attempt in w…
URL: https://github.com/apache/flink/pull/11248#discussion_r385527439
 
 

 ##########
 File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java
 ##########
 @@ -454,6 +456,11 @@ public void onError(Throwable error) {
                onFatalError(error);
        }
 
+       @VisibleForTesting
+       Map<ResourceID, YarnWorkerNode> getWorkerNodeMap() {
+               return workerNodeMap;
 
 Review comment:
   ```suggestion
                return Collections.unmodifiableMap(workerNodeMap);
   ```
   We should always be careful exposing non-primitive fields, such as `Map` and 
`List`. Despite declared `final`, they might still be changed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to