hadoop-yarn-issues mailing list archives

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

     [ https://issues.apache.org/jira/browse/YARN-7192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Arun Suresh updated YARN-7192:
------------------------------
    Attachment: YARN-7192.004.patch

Updating patch

bq. A single null check in a function consumes less CPU cycles than a fetch + call and a ret
to a virtual function. There are two cases it can cause a problem. Code ran very frequently
like this may add up and make the overall product slower. It creates a precedence that others
will follow, and it may cause performance issues in other code added later.
To allay your concerns, I have made the noop listener a static field and made the 'listener'
field final. Both these will ensure that JIT inlines the method call to an actual no-op. This
should be even better than the if null check. To be honest, I really dislike null checks,
not just becuase the code looks ugly, but all future code that might use the listener will
have to re-perform the null check. I would've used the jdk 8 optional, but Id like it to backport
to branch-2 without modification.

Fixed the checckstyles.

> 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, YARN-7192.003.patch, YARN-7192.004.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