[
https://issues.apache.org/jira/browse/HADOOP-17463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17261599#comment-17261599
]
Ahmed Hussein commented on HADOOP-17463:
----------------------------------------
[~kihwal], [~vinayakumarb], [~weichiu]. There was HDFS-6841 to address that
before.
It is obvious to change all busy waiting loops. Do you have any suggestions, or
thoughts of the elements that need actualTime, and how to prevent this pitfall
from happening in the future?
> Replace currentTimeMillis with monotonicNow in elapsed time
> -----------------------------------------------------------
>
> Key: HADOOP-17463
> URL: https://issues.apache.org/jira/browse/HADOOP-17463
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Ahmed Hussein
> Assignee: Ahmed Hussein
> Priority: Major
>
> I noticed that there is a widespread incorrect usage of
> {{System.currentTimeMillis()}} throughout the hadoop code.
> For example:
> {code:java}
> // Some comments here
> long start = System.currentTimeMillis();
> while (System.currentTimeMillis() - start < timeout) {
> // Do something
> }
> {code}
> Elapsed time should be measured using `monotonicNow()`.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]