You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "lindongdong (JIRA)" <ji...@apache.org> on 2019/03/11 12:19:00 UTC
[jira] [Updated] (YARN-9376) too many ContainerIdComparator is not
necessary
[ https://issues.apache.org/jira/browse/YARN-9376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
lindongdong updated YARN-9376:
------------------------------
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
{code:java}
/* set of containers that need to be cleaned */
private final Set<ContainerId> containersToClean = new TreeSet<ContainerId>(
new ContainerIdComparator());
{code}
was:
One RMNodeImpl will create a new ContainerIdComparator instance, but it is not necessary.
we may keep a static ContainerIdComparator instance is enough.
org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl#containersToClean
{code:java}
/* set of containers that need to be cleaned */
private final Set<ContainerId> containersToClean = new TreeSet<ContainerId>(
new ContainerIdComparator());
{code}
> too many ContainerIdComparator is not necessary
> -----------------------------------------------
>
> Key: YARN-9376
> URL: https://issues.apache.org/jira/browse/YARN-9376
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: resourcemanager
> Affects Versions: 3.1.1, 3.1.2
> Reporter: lindongdong
> Priority: Minor
>
> 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
> {code:java}
> /* set of containers that need to be cleaned */
> private final Set<ContainerId> containersToClean = new TreeSet<ContainerId>(
> new ContainerIdComparator());
> {code}
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org