[
https://issues.apache.org/jira/browse/HADOOP-11032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14253731#comment-14253731
]
Sangjin Lee commented on HADOOP-11032:
--------------------------------------
Thanks for the patch [~ozawa]! Some comments:
mapred/FileInputFormat.java
- l.246: now() is in nanosecond; you should call now(TimeUnit.MILLISECONDS)
StopWatch.java
- l.51: why another call of System.nanoTime()? Perhaps you forgot to remove it?
- l.60: I would check the state before calling System.nanoTime()
- it would be clearer to rename members to startNanos and currentElapsedNanos
to be clear that's the unit...
- l.45 I would say "this instance of StopWatch" in the javadoc to be clear
we're not returning an arbitrary instance; the same for all methods that return
this
- AutoCloseable is a class introduced in Java 1.7. So is the restriction of not
using Java 1.7 classes lifted?
- nit: can we not use guava's Preconditions? It's a simple check of the state,
and while we're at reducing the usage of guava here, relying on Preconditions
seems going against that grain.
Journal.java
- l.382: it might be good to get the millis once and reuse it
JvmPauseMonitor.java
- the StopWatch import is unnecessary as it's in the same package
TestChunkedArrayList.java
- the StopWatch import is unnecessary as it's in the same package
TestDataChecksum.java
- the StopWatch import is unnecessary as it's in the same package
> 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, HADOOP-11032.4.patch,
> HADOOP-11032.5.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)