You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2015/03/20 17:03:38 UTC

[jira] [Commented] (HADOOP-11709) Time.NANOSECONDS_PER_MILLISECOND - use class-level final constant instead of method variable

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

Hudson commented on HADOOP-11709:
---------------------------------

FAILURE: Integrated in Hadoop-trunk-Commit #7382 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/7382/])
HADOOP-11709. Time.NANOSECONDS_PER_MILLISECOND - use class-level final constant instead of method variable. Contributed by Ajith S. (ozawa: rev 43dde502b3be2133d62f1f074f016f35a56a7e2c)
* hadoop-common-project/hadoop-common/CHANGES.txt
* hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Time.java


> Time.NANOSECONDS_PER_MILLISECOND - use class-level final constant instead of method variable 
> ---------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-11709
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11709
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Ajith S
>            Assignee: Ajith S
>            Priority: Trivial
>              Labels: beginner, newbie
>             Fix For: 2.8.0
>
>         Attachments: 001-HDFS-7919.patch
>
>
> NANOSECONDS_PER_MILLISECOND constant can be moved to class level instead of creating it in each method call.
> {code}
> org.apache.hadoop.util.Time.java
>  public static long monotonicNow() {
>     final long NANOSECONDS_PER_MILLISECOND = 1000000;
>     return System.nanoTime() / NANOSECONDS_PER_MILLISECOND;
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)