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

Haibo Chen commented on MAPREDUCE-6771:
---------------------------------------

Tried the following code to verify with InOrder
{code:java}
    InOrder inOrder = inOrder(eventHandler);
    inOrder.verify(eventHandler).handle(
        any(TaskAttemptDiagnosticsUpdateEvent.class));
    inOrder.verify(eventHandler).handle(any(TaskAttemptEvent.class));
    inOrder.verifyNoMoreInteractions();
{code}
Getting the following error:
{code:java}
org.mockito.exceptions.verification.VerificationInOrderFailure: 
Verification in order failure:
eventHandler.handle(<any>);
Wanted 1 time:
-> at 
org.apache.hadoop.mapreduce.v2.app.rm.TestRMContainerAllocator.testHandlingFinishedContainers(TestRMContainerAllocator.java:3049)
But was 2 times. Undesired invocation:
-> at 
org.apache.hadoop.mapreduce.v2.app.rm.RMContainerAllocator.processFinishedContainer(RMContainerAllocator.java:864)

        at 
org.apache.hadoop.mapreduce.v2.app.rm.TestRMContainerAllocator.testHandlingFinishedContainers(TestRMContainerAllocator.java:3049)

{code}
I seems like mockito does not distinguish the two types of events passed to 
event handler. 

> RMContainerAllocator sends container diagnostics event after corresponding 
> completion event
> -------------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-6771
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6771
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: mrv2
>    Affects Versions: 2.7.3
>            Reporter: Haibo Chen
>            Assignee: Haibo Chen
>         Attachments: TaUnsuccessfullyEventEmission.jpg, 
> mapreduce6771.001.patch, mapreduce6771.002.patch, mapreduce6771.003.patch
>
>
> Task containers can go over their resource limit, and killed by Node Manager. 
> Then MR AM gets notified of the container status and diagnostics information 
> through its heartbeat with RM.  However, it is possible that the diagnostics 
> information never gets into .jhist file, so when the job completes, the 
> diagnostics information associated with the failed task attempts is empty.  
> This makes it hard for users to root cause job failures that are often caused 
> by memory leak.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to