[ https://issues.apache.org/jira/browse/HADOOP-10048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15294405#comment-15294405 ]
Jason Lowe commented on HADOOP-10048: ------------------------------------- Correct, AtomicReference internally just uses volatile. I went with it so future maintainers are more likely to cache the reference in a local when wielding it. When it was a naked volatile member it was easier to accidentally reference it multiple times in an expression or method which could result in surprising inconsistencies sometimes. I suspect the volatile is ever-so-slightly faster than the AtomicReference since the former requires loading an offset within the current object to get the context reference while the latter requires loading an offset within the current object to get the AtomicReference reference object then loading _that_ to get the context reference. However the difference will be unmeasurable with this use-case, so I went with the more-likely-to-be-correct-under-maintenance approach. > LocalDirAllocator should avoid holding locks while accessing the filesystem > --------------------------------------------------------------------------- > > Key: HADOOP-10048 > URL: https://issues.apache.org/jira/browse/HADOOP-10048 > Project: Hadoop Common > Issue Type: Improvement > Affects Versions: 2.3.0 > Reporter: Jason Lowe > Assignee: Jason Lowe > Attachments: HADOOP-10048.003.patch, HADOOP-10048.004.patch, > HADOOP-10048.patch, HADOOP-10048.trunk.patch > > > As noted in MAPREDUCE-5584 and HADOOP-7016, LocalDirAllocator can be a > bottleneck for multithreaded setups like the ShuffleHandler. We should > consider moving to a lockless design or minimizing the critical sections to a > very small amount of time that does not involve I/O operations. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org