[
https://issues.apache.org/jira/browse/MAPREDUCE-4842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13537181#comment-13537181
]
Mariappan Asokan commented on MAPREDUCE-4842:
---------------------------------------------
Thanks to all of you for your comments. Thanks to Thomas for the testing. I
will address your comments below:
Siddharth Seth:
{quote}
ReduceTask logs should have the exception. I didn't look in detail,...
{quote}
I addressed this issue in the patch I am going to upload.
{quote}
Asokan, for this specific JIRA, I'd, at least, be more comfortable with
Arun/Jason's patch to fix this blocker,...
{quote}
I have to respectfully disagree on this for the following reasons:
* it did not address the root cause of the problem namely the race condition
due to the {{isInProgress()}} method. I strongly feel that it should be
removed.
* It is still going through premature merge passes before enough map outputs
are shuffled to memory resulting in potential performance issue.
* The patch is more complicated(adding unnecessary new method in the base class
and forcing all subclasses to implement it even though this problem exists only
for in-memory merger.)
Jason Lowe:
{quote}
Regarding the removal of the element in the finally block, I'm not sure why
we're waiting until after merging...
{quote}
Thanks for pointing this out. I realized this and in the new patch I am
uploading, I took care of that.
{quote}
Speaking of the finally block, I'm also curious if we really want to only
notify others of the merge completing if there are no further merges pending.
Arguably we should wake them up as soon as any merge completes, as it did
previously, because usedMemory should have been lowered during the merge and
would allow more shuffle data to be fetched into memory. Waiting until there
are no more merges pending means we can't pipeline the shuffle data fetch with
ongoing merges if all the fetchers are waiting for the merge so memory can be
freed. Waking up waiters on any merge completion means we don't need to lock
pendingToBeMerged at all in the finally block (once we also make the change
suggested above) and the finally block reverts to what it was originally.
{quote}
Good point. However, if we revert the {{finally}} block it may cause the call
to {{close()}} to return prematurely even though one more merge is pending.
Any performance gain due to the additional fetches is moot. First, the pending
merge would have used up most of the memory. Also, the merge is
data-dependent. It may not free up memory sooner. This will result in stalled
map output.
I really appreciate all your comments and the testing. I will upload the new
patch shortly.
-- Asokan
> Shuffle race can hang reducer
> -----------------------------
>
> Key: MAPREDUCE-4842
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4842
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: mrv2
> Affects Versions: 2.0.2-alpha, 0.23.5
> Reporter: Jason Lowe
> Assignee: Mariappan Asokan
> Priority: Blocker
> Attachments: MAPREDUCE-4842-2.patch, mapreduce-4842.patch,
> mapreduce-4842.patch, MAPREDUCE-4842.patch, MAPREDUCE-4842.patch,
> MAPREDUCE-4842.patch, MAPREDUCE-4842.patch
>
>
> Saw an instance where the shuffle caused multiple reducers in a job to hang.
> It looked similar to the problem described in MAPREDUCE-3721, where the
> fetchers were all being told to WAIT by the MergeManager but no merge was
> taking place.
--
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