You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Chen Liang (JIRA)" <ji...@apache.org> on 2017/02/14 00:35:41 UTC
[jira] [Created] (HDFS-11409) DatanodeInfo getNetworkLocation and
setNetworkLocation shoud use volatile instead of synchronized
Chen Liang created HDFS-11409:
---------------------------------
Summary: DatanodeInfo getNetworkLocation and setNetworkLocation shoud use volatile instead of synchronized
Key: HDFS-11409
URL: https://issues.apache.org/jira/browse/HDFS-11409
Project: Hadoop HDFS
Issue Type: Improvement
Reporter: Chen Liang
Assignee: Chen Liang
Priority: Minor
{{DatanodeInfo}} has synchronized methods {{getNetworkLocation}} and {{setNetworkLocation}}. While they doing nothing more than setting and getting variable {{location}}.
Since {{location}} is not being modified based on its current value and is independent from any other variables. This JIRA propose to remove synchronized methods but only make {{location}} volatile. Such that threads will not be blocked on get/setNetworkLocation.
Thanks [~szetszwo] for the offline disscussion.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org