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

    https://github.com/apache/flink/pull/6192#discussion_r198914433
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
 ---
    @@ -1120,5 +1120,28 @@ public void reportPayload(ResourceID resourceID, 
Void payload) {
                        return CompletableFuture.completedFuture(null);
                }
        }
    +
    +   // 
------------------------------------------------------------------------
    +   //  Work Registration status checking
    +   // 
------------------------------------------------------------------------
    +
    +   /**
    +    * Check if the executor with given resourceID is still in 
taskExecutors map
    +    * @param resourceID an ID mapping to a task executor
    +    * @return
    +    */
    +   protected boolean checkWorkerRegistrationWithResourceId(ResourceID 
resourceID) {
    +           boolean status = taskExecutors.containsKey(resourceID);
    +           if (!status) {
    +                   log.debug("No open TaskExecutor connection {}. Ignoring 
close TaskExecutor connection.", resourceID);
    +           }
    +           return status;
    +   }
    +
    +   @VisibleForTesting
    +   public void triggerTaskManagerHeartbeatTimeout(ResourceID resourceID) {
    --- End diff --
    
    Let's not add this method which is only used for testing purposes to the 
production code. Instead, I would suggest to subclass `ResourceManager` in your 
test and add this method.


---

Reply via email to