hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Miklos Szegedi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-7192) Add a pluggable StateMachine Listener that is notified of NM Container State changes
Date Fri, 15 Sep 2017 00:49:02 GMT

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

Miklos Szegedi commented on YARN-7192:
--------------------------------------

Thank you, [~asuresh] for the patch. I have a couple of comments.
You need to add an entry to yarn-default.xml
I do not see the reason for having NoopStateTransitionListener. Why do not we just skip calling
in case of null and use null as the noop listener?
What happens if there is no state transition, just a call? If the current state is the same
as the previous state we still call post transition.
{code}
1073	            @Override
1074	        public void preTransition(ContainerImpl op, ContainerState beforeState,
1075	            ContainerEvent eventToBeProcessed) {
1076	          initStateToEvent.put(beforeState, eventToBeProcessed.getType());
1077	        }
{code}
There are too many spaces before override.
{code}
291	
292	      ContainerState finalState = wc.eventToFinalState.get(
293	          wc.initStateToEvent.get(wc.eventToFinalState.get(
294	              wc.initStateToEvent.get(wc.eventToFinalState.get(
295	                  wc.initStateToEvent.get(wc.eventToFinalState.get(
296	                      wc.initStateToEvent.get(wc.eventToFinalState.get(
297	                          wc.initStateToEvent.get(ContainerState.NEW))))))))));
298	      Assert.assertEquals(ContainerState.DONE, finalState);
{code}
While this check is correct, individual assertions for each transition might help with debugging.

> 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, YARN-7192.002.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: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message