[ 
https://issues.apache.org/jira/browse/FLINK-4516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15449218#comment-15449218
 ] 

ASF GitHub Bot commented on FLINK-4516:
---------------------------------------

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

    https://github.com/apache/flink/pull/2427#discussion_r76810618
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/rpc/resourcemanager/ResourceManager.java
 ---
    @@ -116,4 +142,78 @@ public SlotAssignment requestSlot(SlotRequest 
slotRequest) {
     
                return new TaskExecutorRegistrationSuccess(new InstanceID(), 
5000);
        }
    +
    +   /**
    +    * Callback method when current resourceManager is granted leadership
    +    *
    +    * @param newLeaderSessionID unique leadershipID
    +    */
    +   void handleGrantLeadership(final UUID newLeaderSessionID) {
    --- End diff --
    
    This method can be private.


> ResourceManager leadership election
> -----------------------------------
>
>                 Key: FLINK-4516
>                 URL: https://issues.apache.org/jira/browse/FLINK-4516
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Cluster Management
>            Reporter: zhangjing
>            Assignee: zhangjing
>
> 1. When a resourceManager is started, it starts the leadership election 
> service first and take part in contending for leadership
> 2. Every resourceManager contains a ResourceManagerLeaderContender, when it 
> is granted leadership, it will start SlotManager and other main components. 
> when it is revoked leadership, it will stop all its components and clear 
> everything.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to