[
https://issues.apache.org/jira/browse/HADOOP-11032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14250925#comment-14250925
]
Sangjin Lee commented on HADOOP-11032:
--------------------------------------
Thanks for the patch [~ozawa]!
One high level comment: although the APIs are similar, guava's Stopwatch is
based on System.nanoTime(), whereas Apache Common's StopWatch is using
System.currentTimeMillis(). The resolution of the latter is not terribly great,
and I do worry about lost precision here, especially ones like in Journal where
it appears to be looking for microseconds. So I'm basically -1 on using Apache
StopWatch.
How about introducing a small utility class in hadoop itself to handle this? It
can really be a very very simple class, and may be worth it if we want to avoid
using guava for simple things like this.
> 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, HADOOP-11032.2.patch,
> HADOOP-11032.3.patch, HADOOP-11032.3.patch, HADOOP-11032.3.patch,
> HADOOP-11032.3.patch, HADOOP-11032.3.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
(v6.3.4#6332)