Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-2323

FairShareComparator creates too many Resource objects

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.6.0
    • fairscheduler
    • None
    • Reviewed

    Description

      Each call of FairShareComparator creates a new Resource object "one":

      Resource one = Resources.createResource(1);
      

      At the volume of 1000 nodes and 1000 apps, the comparator will be called more than 10 million times per second, thus creating more than 10 million object "one", which is unnecessary.

      Since the object "one" is read-only and is never referenced outside of comparator, we could make it static.

      Attachments

        1. YARN-2323.patch
          2 kB
          Hong Zhiguo
        2. YARN-2323-2.patch
          2 kB
          Hong Zhiguo

        Activity

          People

            zhiguohong Hong Zhiguo
            zhiguohong Hong Zhiguo
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: