[
https://issues.apache.org/jira/browse/HDFS-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071149#comment-13071149
]
Suresh Srinivas commented on HDFS-2191:
---------------------------------------
> Is this correct? 10000 * heartbeatIntervalSeconds Why 10000? Should you be
> multiplying it by 1000 when getting it from conf and not 10000 *?
Sorry I was not clear in my comments. The newly added code is:
{noformat}
+
+ final long heartbeatIntervalSeconds = conf.getLong(
+ DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY,
+ DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_DEFAULT);
+ final int heartbeatRecheckInterval = conf.getInt(
+ DFSConfigKeys.DFS_NAMENODE_HEARTBEAT_RECHECK_INTERVAL_KEY,
+ DFSConfigKeys.DFS_NAMENODE_HEARTBEAT_RECHECK_INTERVAL_DEFAULT); // 5
minutes
+ this.heartbeatExpireInterval = 2 * heartbeatRecheckInterval
+ + 10000 * heartbeatIntervalSeconds;
{noformat}
{{heartbeatIntervalSeconds}} is actually in milliseconds. So can you call it
{{heartbeatIntervalMilliSeconds}}. Rest of the code looks correct.
> FSNamesystem currently requires quite a few methods in DatanodeMnaager, e.g.
> getNetworkTopology(), registerDatanode(..), etc. The getDatanode(..) methods
> are only two of those methods. Let's think about how to change the APIs after
> the code separation is done. Okay?
Sounds good
> I think you are talking about FSNamesystem.heartbeatCheck(). I incorrectly
> removed the synchronization. Fixed it.
DatanodeManager#getDatanode() - how is the map access synchronized in this?
> It should accquire the write lock of DatanodeManager when we have read-write
> lock in DatanodeManager in the future.
We should track this with a jira, since the synchronization that is in the
current code is not correct.
> Move datanodeMap from FSNamesystem to DatanodeManager
> -----------------------------------------------------
>
> Key: HDFS-2191
> URL: https://issues.apache.org/jira/browse/HDFS-2191
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: name-node
> Reporter: Tsz Wo (Nicholas), SZE
> Assignee: Tsz Wo (Nicholas), SZE
> Attachments: h2191_20110723.patch, h2191_20110723b.patch,
> h2191_20110726.patch
>
>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira