hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen Liang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-14276) Add a nanosecond API to Time/Timer/FakeTimer
Date Thu, 06 Apr 2017 19:44:42 GMT

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

Chen Liang commented on HADOOP-14276:

Thanks [~xkrogen] for working on this! v000 patch LGTM, only one minor thing though, {{FakeTimer}}
seems to have changed the behaviour the {{monotonicNow()}} a little bit. More specifically,
imagine I call {{monotonicNow()}} on a newly created {{FakeTimer}}, the old version will return
1000, because that's the initial value. While the new version will return {{TimeUnit.NANOSECONDS.toMillis(1000);}},
which I guess would be a 0. Is this fine? (This does not seem to be an issue to me, but still
want to make sure.)

> 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

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

View raw message