hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Steelman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11032) Replace use of Guava Stopwatch with Apache StopWatch
Date Sat, 30 Aug 2014 17:20:53 GMT

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

Gary Steelman commented on HADOOP-11032:

Thanks for uploading a patch [~ozawa]. I was working to upload mine today but you got there
before me! Yes, millisecond precision is one concern and there are some existing places which
expect microsecond values. These values are expected to be on the order of 10^3 larger than
the millisecond value returned by Stopwatch.getTime(). In this case we can use TimeUnit to
convert, since TimeUnit is already part of the code:

TimeUnit.MICROSECONDS.convert(sw.getTime(), TimeUnit.MILLISECONDS);

I will upload a second patch shortly with a couple changes from your patch

> Replace use of Guava Stopwatch with Apache StopWatch
> ----------------------------------------------------
>                 Key: HADOOP-11032
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11032
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Gary Steelman
>            Assignee: Tsuyoshi OZAWA
>         Attachments: HADOOP-11032.1.patch
> This patch reduces Hadoop's dependency on an old version of guava. Stopwatch.elapsedMillis()
isn't part of guava past v16 and the tools I'm working on use v17. 
> To remedy this and also reduce Hadoop's reliance on old versions of guava, we can use
the Apache StopWatch (org.apache.commons.lang.time.StopWatch) which provides nearly equivalent
functionality. apache.commons.lang is already a dependency for Hadoop so this will not introduce
new dependencies. 

This message was sent by Atlassian JIRA

View raw message