You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Andy Isaacson (JIRA)" <ji...@apache.org> on 2012/07/17 20:35:34 UTC
[jira] [Commented] (HDFS-3640) Don't use Util#now or
System#currentTimeMillis for calculating intervals
[ https://issues.apache.org/jira/browse/HDFS-3640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13416432#comment-13416432 ]
Andy Isaacson commented on HDFS-3640:
-------------------------------------
There is a subtle distinction here, between cases where *timeofday* should be used and cases where *monotonic* time should be used. Both have their place in a distributed system.
If a timer is used to compute a delay period as in HDFS-3485, then it's important to use *monotonic* time.
If a clock is used to generate a time, or a unique identifier, or an opaque token that is written to a persistent store or sent over the wire to another node (even if in an "opaque" object), then it's important to use *timeofday*.
> Don't use Util#now or System#currentTimeMillis for calculating intervals
> ------------------------------------------------------------------------
>
> Key: HDFS-3640
> URL: https://issues.apache.org/jira/browse/HDFS-3640
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 2.0.0-alpha
> Reporter: Eli Collins
> Assignee: Eli Collins
>
> Per HDFS-3485 we shouldn't use Util#now or System#currentTimeMillis to calculate intervals as they can be affected by system clock changes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira