[
https://issues.apache.org/jira/browse/YARN-7192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16167028#comment-16167028
]
Arun Suresh commented on YARN-7192:
-----------------------------------
Thanks for the detailed review [~jlowe].
bq. Would it make sense for the listener API to directly support multiple
listeners?
While I agree, this would be useful, and yes, we do have Multi handlers etc., I
was thinking of keeping it simple (for many of the situations you pointed out
:)) initially to solve our particular use-case. Is it OK if we do this in a
follow up ?
I agree with the rest of your suggestions. Will upload a patch shortly
addressing them.
[[email protected]], thanks for taking a look, and for raising
YARN-7009. I agree it is a similar approach. Incidentally, I had initially
started with a decorator approach, but given that I wanted to expose this as an
external user interface, I decided against it as I did not want the client to
access the internal state machine. Furthermore, I had wanted an explicit
*before* and *after* hook.
bq. My concern is that it might cause performance/concurrency issues to call
listeners synchronously from the state machine.
I understand the state machine transitions are synchronous w.r.t the internal
statemachine and the listener hooks are called within the same synchronized
context. But I agree, a listener implementation can possibly make other
synchronous calls and block things (but the current Transitions can do the same
too). I am thinking we document the fact so users do not shoot themselves in
the foot. Thoughts ?
> Add a pluggable StateMachine Listener that is notified of NM Container State
> changes
> ------------------------------------------------------------------------------------
>
> Key: YARN-7192
> URL: https://issues.apache.org/jira/browse/YARN-7192
> Project: Hadoop YARN
> Issue Type: Bug
> Reporter: Arun Suresh
> Assignee: Arun Suresh
> Attachments: YARN-7192.001.patch
>
>
> This JIRA is to add support for a plugggable class in the NodeManager that is
> notified of changes to the Container StateMachine state and the events that
> caused the change.
> The proposal is to modify the basic StateMachine class add support for a hook
> that is called before and after a transition.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]