Github user mxm commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2463#discussion_r77629249
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
 ---
    @@ -131,9 +149,16 @@ public RegistrationResponse apply(final 
JobMasterGateway jobMasterGateway) {
         * @return Slot assignment
         */
        @RpcMethod
    -   public SlotAssignment requestSlot(SlotRequest slotRequest) {
    -           System.out.println("SlotRequest: " + slotRequest);
    -           return new SlotAssignment();
    +   public SlotRequestRegistered requestSlot(SlotRequest slotRequest) {
    +           final JobID jobId = slotRequest.getJobId();
    +           final JobMasterGateway jobMasterGateway = 
jobMasterGateways.get(jobId);
    +
    +           if (jobMasterGateway != null) {
    +                   return slotManager.requestSlot(slotRequest);
    +           } else {
    +                   LOG.info("Ignoring slot request for unknown JobMaster 
with JobID {}", jobId);
    +                   return null;
    --- End diff --
    
    The rationale here was to simply ignore this request because the JobManager 
is not registered. You're right, probably better to reply with a meaningful 
answer. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to