tillrohrmann commented on a change in pull request #13592:
URL: https://github.com/apache/flink/pull/13592#discussion_r505259078



##########
File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManagerDriver.java
##########
@@ -442,38 +444,25 @@ private RegisterApplicationMasterResponse 
registerApplicationMaster() throws Exc
                return 
resourceManagerClient.registerApplicationMaster(rpcAddress, restPort, 
webInterfaceUrl);
        }
 
-       private void getContainersFromPreviousAttempts(final 
RegisterApplicationMasterResponse registerApplicationMasterResponse) {
+       private int getContainersFromPreviousAttempts(final 
RegisterApplicationMasterResponse registerApplicationMasterResponse) {
                final List<Container> containersFromPreviousAttempts =
                        
registerApplicationMasterResponseReflector.getContainersFromPreviousAttempts(registerApplicationMasterResponse);
                final List<YarnWorkerNode> recoveredWorkers = new ArrayList<>();
 
                log.info("Recovered {} containers from previous attempts 
({}).", containersFromPreviousAttempts.size(), containersFromPreviousAttempts);
 
+               int maxPriority = 0;
                for (Container container : containersFromPreviousAttempts) {
                        final YarnWorkerNode worker = new 
YarnWorkerNode(container, getContainerResourceId(container));
                        recoveredWorkers.add(worker);
+                       maxPriority = 
Math.max(container.getPriority().getPriority(), maxPriority);

Review comment:
       Alright, this sounds good to me.




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


Reply via email to