[
https://issues.apache.org/jira/browse/MAPREDUCE-7277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17093578#comment-17093578
]
Jonathan Turner Eagles commented on MAPREDUCE-7277:
---------------------------------------------------
[~epayne], [~Jim_Brennan], thanks for you reviews. I've addressed your comments
in the latest patch.
- checkTotalMemoryUsed is removed. This was indeed leftover code from debugging.
- queue and cache are now kept in sync, so the absence of the item in the queue
may not be an error now as removeMap is only called in testing and not during
runtime. Instead runtime removal is done by freeIndexInformation. To that
point, I have refactored removeMap and freeIndexInformation so they both the
underlying removeMapInternal. This is done to increase code coverage by the
tests and have them better represent runtime environment.
- totalMemoryUsed is only mostly atomic and is better characterized as
eventually consistent in the original patch. I have reordered some of the
operations to better have totalMemoryUsed, queue, and, cache so that there is
less gap and have synchronized operations on IndexInformation consistently.
- there was indeed an error condition where an IOException occurs during a
read. In this case, queue would contain an item not contained in the cache. To
remedy this, I have introduced a success flag. This allows the code to only
synchronize a single time and keep all of the operations in the finally
statement, keeping a tighter control on atomicity with the cost of added
complexity of keeping track of success state.
Please have another review of patch 003 when you have a chance.
> IndexCache totalMemoryUsed differs from cache contents.
> -------------------------------------------------------
>
> Key: MAPREDUCE-7277
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-7277
> Project: Hadoop Map/Reduce
> Issue Type: Improvement
> Reporter: Jonathan Turner Eagles
> Assignee: Jonathan Turner Eagles
> Priority: Major
> Attachments: IndexCacheActualSize.png, MAPREDUCE-7277.001.patch,
> MAPREDUCE-7277.002.patch, MAPREDUCE-7277.003.patch
>
>
> It was observed recently in a nodemanager OOM that the memory was filled with
> SpillRecords. However, the IndexCache was only 15% full (1.5MB used on a 10MB
> configured cache size). In particular was noted that the booking variable
> totalMemoryUsed, was out of sync with the contents of the cache showing 96%
> full, thereby drastically reducing the effectiveness of the cache.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]