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

Jinglun commented on HDFS-15120:
--------------------------------

Hi [~ayushtkn], thanks your comments. Agree with you,  the 
BlockPlacementPolicies.getPolicy() is in many hot paths and we should try to 
avoid the lock cost ! We can make the placementPolicies variable volatile and 
refresh it directly. There can only be one thread updating the reference so it 
should be thread-safe. Upload v07.

> Refresh BlockPlacementPolicy at runtime.
> ----------------------------------------
>
>                 Key: HDFS-15120
>                 URL: https://issues.apache.org/jira/browse/HDFS-15120
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Jinglun
>            Assignee: Jinglun
>            Priority: Major
>         Attachments: HDFS-15120.001.patch, HDFS-15120.002.patch, 
> HDFS-15120.003.patch, HDFS-15120.004.patch, HDFS-15120.005.patch, 
> HDFS-15120.006.patch
>
>
> Now if we want to switch BlockPlacementPolicies we need to restart the 
> NameNode. It would be convenient if we can switch it at runtime. For example 
> we can switch between AvailableSpaceBlockPlacementPolicy and 
> BlockPlacementPolicyDefault as needed.



--
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