Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-1676

DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve performance

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 0.21.0
    • None
    • balancer & mover

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            nancyesmis Xiaoming Shi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: