xintongsong commented on a change in pull request #11323: [FLINK-16439][k8s] 
Make KubernetesResourceManager starts workers using WorkerResourceSpec 
requested by SlotManager
URL: https://github.com/apache/flink/pull/11323#discussion_r394865352
 
 

 ##########
 File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/KubernetesResourceManager.java
 ##########
 @@ -81,10 +80,8 @@
 
        private final FlinkKubeClient kubeClient;
 
-       private final ContaineredTaskManagerParameters taskManagerParameters;
-
-       /** The number of pods requested, but not yet granted. */
-       private int numPendingPodRequests = 0;
+       /** Map from pod name to worker resource. */
+       private final Map<String, WorkerResourceSpec> podWorkerResources;
 
 Review comment:
   1. True. I'll try to clean up when the pod with corresponding name is 
removed from `workerNodes`. I believe that means we no longer need its resource 
information.
   
   2. I think it's by design. The original behavior is that RM asks SM for 
pending slots, and will only request new pod only if there are more pending 
slots than the slots of the pending TM/pods. In case of JM failover, there 
should be no pending slots from previous attempt. Therefore, only slots 
requested in the new attempt is considered. I think the current behavior aligns 
with the original.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to