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

    https://github.com/apache/flink/pull/5881#discussion_r183243029
  
    --- Diff: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java ---
    @@ -265,6 +272,29 @@ protected void initialize() throws 
ResourceManagerException {
                }
        }
     
    +   @Override
    +   public CompletableFuture<RegistrationResponse> registerTaskExecutor(
    --- End diff --
    
    I think it's better to override `workerStarted()`
    
    ```
        @Override
        protected YarnWorkerNode workerStarted(ResourceID resourceID) {
                // ack the pending register
                pendingContainersExpectedToRegister.remove(resourceID);
                return workerNodeMap.get(resourceID);
        }
    ```
    
    This method is called when the registration was successful. When 
`registerTaskExecutor` is called, the registration can still fail.


---

Reply via email to