[
https://issues.apache.org/jira/browse/YARN-1574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13866282#comment-13866282
]
Karthik Kambatla commented on YARN-1574:
----------------------------------------
bq. 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.
That is true for the current approach of destroy-and-recreate that we use for
RMActiveServices. I was wondering about the behavior in the future when we
actually support suspend-resume capability to our services, but I guess then we
won't be re-registering handlers either. So, yeah, I think we are good there.
We should be careful and make sure all AlwaysOn services that register a
handler should be handled in setup dispatcher - may be add comments both at the
site of calling setup dispatcher and javadoc for setup-dispatcher.
Can we add a unit test as well? Add all handlers to the dispatcher and call
transitions to standby and active a couple of times and make sure the number of
handlers is right, or something along those lines?
> 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, YARN-1574.2.patch,
> YARN-1574.2.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)