Wangda Tan commented on YARN-2729:

Hi [~Naganarasimha],
After looked at the patch, and implementation of NodeHealthMonitorExecutor, I 
think it may not proper to put a "common" class for them to yarn.utils. Reasons 
# We already have a ShellCommandExecutor, that is enough to run a general 
script, and set timeout, fetch output, etc.
# The purpose of NodeHealthScriptRunner and NodeLabelScriptRunner (The name in 
my mind :)) are different: NodeHealthScriptRunner needs do a lot of checks for 
exception because it need to tell RM what actual happens, but 
NodeLabelScriptRunner doesn't need so, just a list of successfully fetched 
labels or no, if failed to run script, log errors to log should be enough.

So I suggest do to this like NodeHealthScriptRunner, and remove what we don't 
need, it should be able to,
# If the script is failed or timeout or exception happened, and log them 
# Upon successfully execute script, parse output for labels. I think we can 
define, lines start with "NODE_LABELS:" are node labels, and splited by ",". 
NODE_LABELS:java, windows\n
...(other messages)
The result should be {"java", "windows", "gpu", "x86"}.
And you need make checkAndThrowLabelName in CommonsNodeLabelsManager public, 
check the labels if valid before send to RM.

Does this make sense to you?

NM_NODE_LABELS_SCRIPT_PROVIDER_PREFIX is more clear to me, similar to others


> Support script based NodeLabelsProvider Interface in Distributed Node Label 
> Configuration Setup
> -----------------------------------------------------------------------------------------------
>                 Key: YARN-2729
>                 URL: https://issues.apache.org/jira/browse/YARN-2729
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager
>            Reporter: Naganarasimha G R
>            Assignee: Naganarasimha G R
>         Attachments: YARN-2729.20141023-1.patch, YARN-2729.20141024-1.patch
> Support script based NodeLabelsProvider Interface in Distributed Node Label 
> Configuration Setup . 

This message was sent by Atlassian JIRA

Reply via email to