You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Tsz Wo Nicholas Sze (JIRA)" <ji...@apache.org> on 2015/07/28 02:35:05 UTC

[jira] [Resolved] (HDFS-1676) DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve performance

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

Tsz Wo Nicholas Sze resolved HDFS-1676.
---------------------------------------
    Resolution: Not A Problem

Resolving this as not-a-problem.  Please feel free to reopen if you disagree.

> DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve performance
> ------------------------------------------------------------------------------------------
>
>                 Key: HDFS-1676
>                 URL: https://issues.apache.org/jira/browse/HDFS-1676
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: balancer & mover
>    Affects Versions: 0.21.0
>            Reporter: Xiaoming Shi
>              Labels: newbie
>
> In the file:
> ./hadoop-0.21.0/hdfs/src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java  line:1520
> In the while loop, DateFormat.getDateTimeInstance()is called in each iteration. We can cache the result by moving it outside the loop or adding a class member.
> This is similar to the Apache bug https://issues.apache.org/bugzilla/show_bug.cgi?id=48778 



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