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

David Mollitor commented on HDFS-14865:
---------------------------------------

[~elgoiri]

So, I was looking at the code, looking to remove some synchronization wherever 
I can find.

In this case, the threads require the {{namesystem}} write lock to interact 
with methods that modify the internal structure, so that is a pretty 
restrictive access applied.  On top of it, I did not remove synchronization 
from the class per se, I simply pushed it down into the collection using a 
{{ConcurrentHashMap}}.  The {{ConcurrentHashMap}} is nifty because it 
internally has several locks so that it can lock certain sections of the 
{{Map}} without locking the entire structure.

My aim here is to make it possible for the {{get*()}} methods of this class to 
be able to interact with the structure without serialized synchronization.

> Reduce Synchronization in DatanodeManager
> -----------------------------------------
>
>                 Key: HDFS-14865
>                 URL: https://issues.apache.org/jira/browse/HDFS-14865
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>    Affects Versions: 3.2.0
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Major
>         Attachments: HDFS-14865.1.patch, HDFS-14865.2.patch, 
> HDFS-14865.3.patch
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to