You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/28 15:02:00 UTC

[jira] [Commented] (KAFKA-2607) Review `Time` interface and its usage

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

ASF GitHub Bot commented on KAFKA-2607:
---------------------------------------

Al12 opened a new pull request #5958: KAFKA-2607: Review Time interface and its usage
URL: https://github.com/apache/kafka/pull/5958
 
 
   This change renames methods in Time interface to make apparent which underlying implementation is used in each case

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Review `Time` interface and its usage
> -------------------------------------
>
>                 Key: KAFKA-2607
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2607
>             Project: Kafka
>          Issue Type: Improvement
>    Affects Versions: 0.11.0.0, 1.0.0
>            Reporter: Ismael Juma
>            Assignee: Aleksei Kogan
>            Priority: Major
>              Labels: newbie
>
> Two of `Time` interface's methods are `milliseconds` and `nanoseconds` which are implemented in `SystemTime` as follows:
> {code}
>     @Override
>     public long milliseconds() {
>         return System.currentTimeMillis();
>     }
>     @Override
>     public long nanoseconds() {
>         return System.nanoTime();
>     }
> {code}
> The issue with this interface is that it makes it seem that the difference is about the unit (`ms` versus `ns`) whereas it's much more than that:
> https://blogs.oracle.com/dholmes/entry/inside_the_hotspot_vm_clocks
> We should probably change the names of the methods and review our usage to see if we're using the right one in the various places.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)