[ 
https://issues.apache.org/jira/browse/HADOOP-14276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15959618#comment-15959618
 ] 

Erik Krogen commented on HADOOP-14276:
--------------------------------------

[~vagarychen] that's true. To maintain exact same behavior I can bump the 
initial value to 1000 ms instead of 1000 ns. It seems no tests failed as a 
result of the change but it seems the original intent was probably to make sure 
that prod code wasn't making assumptions about the value, so provide some 
arbitrary value rather than just 0. Maybe it would be better to initialize it 
to a random value?

> Add a nanosecond API to Time/Timer/FakeTimer
> --------------------------------------------
>
>                 Key: HADOOP-14276
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14276
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: util
>            Reporter: Erik Krogen
>            Assignee: Erik Krogen
>            Priority: Minor
>         Attachments: HADOOP-14276.000.patch
>
>
> Right now {{Time}}/{{Timer}} export functionality for retrieving time at a 
> millisecond-level precision but not at a nanosecond-level precision, which is 
> required for some applications (there's ~70 usages). Most of these seem not 
> to need mocking functionality for tests; only one class currently mocks this 
> out ({{LightWeightCache}}) but we would like to add another as part of 
> HDFS-11615 and want to avoid code duplication. This could be useful for other 
> classes in the future as well.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to