hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (YARN-804) mark AbstractService init/start/stop methods as final
Date Thu, 13 Jun 2013 19:32:21 GMT

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

Steve Loughran updated YARN-804:
--------------------------------

    Attachment: YARN-804-001.patch

Marking the methods as final, and fixing a (recent) test that needs to be moved to the serviceXXX
methods.

This patch breaks mock tests in YARN and mapreduce
                
> mark AbstractService init/start/stop methods as final
> -----------------------------------------------------
>
>                 Key: YARN-804
>                 URL: https://issues.apache.org/jira/browse/YARN-804
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: api
>    Affects Versions: 2.1.0-beta
>            Reporter: Steve Loughran
>            Assignee: Vinod Kumar Vavilapalli
>         Attachments: YARN-804-001.patch
>
>
> Now that YARN-117 and MAPREDUCE-5298 are checked in, we can mark the public AbstractService
init/start/stop methods as final.
> Why? It puts the lifecycle check and error handling around the subclass code, ensuring
no lifecycle method gets called in the wrong state or gets called more than once.When a {{serviceInit(),
serviceStart()  & serviceStop()}} method throws an exception, it's caught and auto-triggers
stop. 
> Marking the methods as final forces service implementations to move to the stricter lifecycle.
It has one side effect: some of the mocking tests play up -I'll need some assistance here

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message