hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Plush (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-1676) DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve performance
Date Sat, 25 Jun 2011 00:20:47 GMT

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

Jim Plush commented on HDFS-1676:
---------------------------------

Wouldn't this defeat the purpose of having the following reporting like? 
the output looks like:
System.out.println("Time Stamp               Iteration#  Bytes Already Moved  Bytes Left To
Move  Bytes Being Moved");

where timestamp is the current iterations's timestamp, to cache it would show an inaccurate
time stamp in the report. Considering how heavy the other parts of this are you would probably
need 10,000 nodes to see a difference in performance times.

> 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
>    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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message