hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsuyoshi Ozawa (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-11709) Time.NANOSECONDS_PER_MILLISECOND - use class-level final constant instead of method variable
Date Fri, 20 Mar 2015 15:57:38 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-11709?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tsuyoshi Ozawa updated HADOOP-11709:
------------------------------------
          Resolution: Fixed
       Fix Version/s: 2.8.0
    Target Version/s: 2.8.0
        Hadoop Flags: Reviewed
              Status: Resolved  (was: Patch Available)

Committed this to trunk and branch-2. Thanks [~ajithshetty] for your contribution, and thanks
[~wheat9] and [~busbey] for your reviews.

> 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)

Mime
View raw message