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

Jason Lowe commented on MAPREDUCE-5769:
---------------------------------------

Thanks for reporting and tracking this down, Rohith!  Comments on the patch:

- TestJobEndNotifier is not an appropriate place for these tests as they have 
nothing to do with job end notification.
- The unit test isn't really testing the fix but the fix as applied to the 
mocked object.  A key indication is that we can remove the 
setApplicationMasterRegistered() call in RMCommunicator and the test will still 
pass.  The test should setup an appropriately mocked scheduler member and call 
the real register() and unregister() methods to verify that the mocked 
scheduler sees unregistration when it should and not when it shouldn't.
- isApplicationMasterRegistered should not be exposed via get/set methods and 
probably doesn't need to be volatile.

> Unregistration to RM should not be called if AM is crashed before registering 
> with RM
> -------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-5769
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5769
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>            Reporter: Rohith
>            Assignee: Rohith
>         Attachments: MAPREDUCE-5769.1.patch
>
>
> Got the scenario from YARN-1752, where unregistration of application master 
> is called before registering with RM.
> There should be mechanism to identify isApplicationMasaterRegistered before 
> calling unregistration (finishApplicationMaster).



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to