hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Varun Vasudev (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-4082) Container shouldn't be killed when node's label updated.
Date Fri, 28 Aug 2015 17:45:46 GMT

    [ https://issues.apache.org/jira/browse/YARN-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14720310#comment-14720310
] 

Varun Vasudev commented on YARN-4082:
-------------------------------------

Thanks for the patch [~leftnoteasy].

Couple of minor fixes -
1.
{code}
+  public void incUsedResource(String nodeLabel, Resource resourceToInc, SchedulerApplicationAttempt
application) {
{code}
and
{code}
+  public void decUsedResource(String nodeLabel, Resource resourceToDec, SchedulerApplicationAttempt
application) {
{code}
need to formatted for line length.

2.
{code}
+        String newPartition;
+        if (newLabels.isEmpty()) {
+          newPartition = RMNodeLabelsManager.NO_LABEL;
+        } else {
+          newPartition = newLabels.iterator().next();
+        }
+
+        String oldPartition = node.getPartition();
{code}
Can you add a comment explaining that only one label is allowed per node? Also, can you move
this code outside the for loop? Seems un-neccessary to evaluate it for every application.

Rest of the patch looks good to me.

> Container shouldn't be killed when node's label updated.
> --------------------------------------------------------
>
>                 Key: YARN-4082
>                 URL: https://issues.apache.org/jira/browse/YARN-4082
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: capacity scheduler
>            Reporter: Wangda Tan
>            Assignee: Wangda Tan
>         Attachments: YARN-4082.1.patch, YARN-4082.2.patch
>
>
> From YARN-2920, containers will be killed if partition of a node changed. Instead of
killing containers, we should update resource-usage-by-partition properly when node's partition
updated.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message