Details
-
Improvement
-
Status: Patch Available
-
Minor
-
Resolution: Unresolved
-
3.1.1, 3.1.2
-
None
-
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());