[
https://issues.apache.org/jira/browse/MAPREDUCE-6927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16114842#comment-16114842
]
Jason Lowe commented on MAPREDUCE-6927:
---------------------------------------
Thanks for updating the patch!
Technically moveToDoneNow can end up failing silently if the staging directory
does not exist. moveToDoneNow could return a boolean result so the caller can
know whether the move actually was performed.
For the test it would be better to split them into two separate tests,
otherwise we're making assumptions that sending two job finished events is
something the job history event handler expects and handles properly, which
isn't something it would normally see in practice.
bq. I had to mock up more stuff than I wanted to to get this to work.
Another way to approach the test is to get the moveToDoneNow method to throw an
IOException, and that's going to test the most likely error to happen with the
code rather than clearing the fileMap which isn't a likely scenario.
moveToDoneNow could be upgraded from private to protected so the test class can
override the behavior to always throw for that test.
It would be good to address the checkstyle issues as well.
> MR job should only set tracking url if history was successfully written
> -----------------------------------------------------------------------
>
> Key: MAPREDUCE-6927
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-6927
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Reporter: Eric Badger
> Assignee: Eric Badger
> Attachments: MAPREDUCE-6927.001.patch, MAPREDUCE-6927.002.patch
>
>
> Currently the RMCommunicator will set the tracking url during unregistration
> once a job has finished, regardless of whether it actually wrote history or
> not. If the write to history failed for whatever reason, we should leave the
> tracking url as null so that we get redirected to the AHS instead of getting
> a job not found on the JHS.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]