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

Xuan Gong commented on YARN-1574:
---------------------------------

bq. It is probably better to cast to Service instead of AbstractService.

fixed

bq. In the above snippet, I would update rmDispatcher and 
rmContext.setDispatcher() after the init and start are called. That way there 
won't be a window where the dispatcher is not started and hence can't handle 
events.

changed.

bq.Can we also make sure that callers of rmContext.getDispatcher() are not 
caching the dispatcher? Even though, most callers are currently in 
RMActiveServices and not Always-On, we should make sure they don't cache. We 
should probably update rmContext.getDispatcher() documentation also to reflect 
that?

Most callers are currently in RMActiveService. , I think that they are fine 
because all of them will be re-initiated with new rmContext. Also, I am curious 
why this is necessary (make sure that callers are not caching the dispatcher) 
since we register the same dispatcher.

> When RM transit from Active to Standby, the same eventDispatcher should not 
> be registered more than once
> --------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-1574
>                 URL: https://issues.apache.org/jira/browse/YARN-1574
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Xuan Gong
>            Assignee: Xuan Gong
>            Priority: Blocker
>         Attachments: YARN-1574.1.patch, YARN-1574.1.patch
>
>
> Currently, we move rmDispatcher out of ActiveService. But we still register 
> the Event dispatcher, such as schedulerDispatcher, RMAppEventDispatcher when 
> we initiate the ActiveService.
> Almost every time when we transit RM from Active to Standby,  we need to 
> initiate the ActiveService. That means we will register the same event 
> Dispatcher which will cause the same event will be handled several times.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to