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_r385519116
 
 

 ##########
 File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java
 ##########
 @@ -464,7 +471,15 @@ public void onContainerStarted(ContainerId containerId, 
Map<String, ByteBuffer>
 
        @Override
        public void onContainerStatusReceived(ContainerId containerId, 
ContainerStatus containerStatus) {
-               // We are not interested in getting container status
+               // We fetch the status of the container from the previous 
attempts.
+               if (containerStatus.getState() == ContainerState.NEW) {
+                       // If the status is "NEW", it means that the container 
is allocated but not be started yet.
+                       // We need to release it.
+                       log.warn("The container {} from the previous attempt 
did not start. Released.", containerId);
 
 Review comment:
   ```suggestion
                        log.info("Releasing container {} from the previous 
attempt. No TaskExecutor started inside.", containerId);
   ```

----------------------------------------------------------------
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