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

too many ContainerIdComparator instances are not necessary

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • 3.1.1, 3.1.2
    • None
    • resourcemanager
    • None

    Description

       One RMNodeImpl will create a new ContainerIdComparator instance, but it is not necessary.

      we may keep a static ContainerIdComparator instance and it is enough.

      org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl#containersToClean

      /* set of containers that need to be cleaned */
      private final Set<ContainerId> containersToClean = new TreeSet<ContainerId>(
          new ContainerIdComparator());
      

      Attachments

        1. YARN-9376.000.patch
          1 kB
          lindongdong

        Activity

          People

            lindongdong lindongdong
            lindongdong lindongdong
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: