[
https://issues.apache.org/jira/browse/HDFS-6841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14369633#comment-14369633
]
Kihwal Lee commented on HDFS-6841:
----------------------------------
In {{DatnodeInfo}}, the semantics of the old variable and methods are changed.
I think we want to keep them as is and make a new variable and methods for the
monotonoic time. I think we don't need any protocol change, since they will
only be used internally in the namenode. But if we do make a protocol change,
it needs to be backward-compatible. E.g. the following in {{JsonUti}} lwill
break the compatibility. New clients talking to an older server will blow up.
{code}
getLong(m, "cacheUsed", 0l),
getLong(m, "lastUpdate", 0l),
+ getLong(m, "lastUpdateTimestamp", 0l),
getInt(m, "xceiverCount", 0),
getString(m, "networkLocation", ""),
{code}
The similar change in {{SafeModeInfo}} is fine, since it is only internally
used.
> Use Time.monotonicNow() wherever applicable instead of Time.now()
> -----------------------------------------------------------------
>
> Key: HDFS-6841
> URL: https://issues.apache.org/jira/browse/HDFS-6841
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Vinayakumar B
> Assignee: Vinayakumar B
> Attachments: HDFS-6841-001.patch, HDFS-6841-002.patch,
> HDFS-6841-003.patch, HDFS-6841-004.patch, HDFS-6841-005.patch
>
>
> {{Time.now()}} used in many places to calculate elapsed time.
> This should be replaced with {{Time.monotonicNow()}} to avoid effect of
> System time changes on elapsed time calculations.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)