reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Seokchan Ahn (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (REEF-1750) Enable YARN Node Labels
Date Sat, 26 Aug 2017 10:12:02 GMT

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

Seokchan Ahn edited comment on REEF-1750 at 8/26/17 10:11 AM:
--------------------------------------------------------------

h1. Enable Node Labeling on REEF Design Proposal

h2. Node Labeling
Node label is a way to group nodes with similar characteristics and applications can specify
where to run. For example, a user can submit Spark application which requires a lot of memory
on memory-rich nodes.


h2. Goals
# Define clear Node Labeling REEF APIs which are compatible with various resource managers.
# Enable Node Labeling on REEF with YARN and Mesos.

h2. Overview

h3. YARN Node Labels
* A node can have only one label assigned to it.
* A node label expression(String) can be specified for an application or for a single ResourceRequest.

h3. Mesos Attributes
* Attributes (key-value pairs where value is optional) can be passed along when Mesos sends
offers to frameworks.
* Each framework will use the received attributes when it decides whether accept or reject
the offer. 

h2. Proposed Design

h3. Node labeling API for EvaluatorRequest

Enable setting node labels as key-value pairs. For YARN, use key as a constant string variable
and set the node label as value since YARN can accept only a single string per a container
request. For Mesos, required {{Attributes}} of an {{Offer}} can be set here.

{{setNodeLabels(String key, String value)}} puts a key-value pair into the {{Map<String,
String> nodeLabels}} in {{EvaluatorRequest.Builder}}.

Example(YARN)
{code:java}
NodeLabelTestDriver.this.evaluatorRequestor.submit(EvaluatorRequest.newBuilder()
    .setNumber(1)
    .setMemory(64)
    .setNumberOfCores(1)
    .setNodeLabels(YarnUtilities.REEF_YARN_NODE_LABEL_EXPRESSION, "mylabel")
    .build());
{code}

Example(Mesos)
{code:java}
NodeLabelTestDriver.this.evaluatorRequestor.submit(EvaluatorRequest.newBuilder()
    .setNumber(1)
    .setMemory(64)
    .setNumberOfCores(1)
    .setNodeLabel("key1", "label1")
    .setNodeLabel("key2", "label2")
    .build());
{code}

After submitting an EvaluatorRequest, ResourceRequestHandler for each resource manager handles
it.
* YarnResourceRequestHandler: Pass the label to YarnClient.
* MesosResourceRequestHandler: Let REEFScheduler reject the Offers that don’t have matching
node label(attribute).




was (Author: scan93):
h1. Enable Node Labeling on REEF Design Proposal

h2. Node Labeling
Node label is a way to group nodes with similar characteristics and applications can specify
where to run. For example, a user can submit Spark application which requires a lot of memory
on memory-rich nodes.


h2. Goals
# Define clear Node Labeling REEF APIs which are compatible with various resource managers.
# Enable Node Labeling on REEF with YARN and Mesos.

h2. Overview

h3. YARN Node Labels
* A node can have only one label assigned to it.
* A node label expression(String) can be specified for an application or for a single ResourceRequest.

h3. Mesos Attributes
* Attributes (key-value pairs where value is optional) can be passed along when Mesos sends
offers to frameworks.
* Each framework will use the received attributes when it decides whether accept or reject
the offer. 

h2. Proposed Design

h3. Node labeling API for EvaluatorRequest

Enable setting node labels as key-value pairs. For YARN, use key as a constant string variable
and set the node label as value since YARN can accept only a single string per a container
request. For Mesos, required {{Attributes}} of an {{Offer}} can be set here.

{{setNodeLabels(String key, String value)}} puts a key-value pair into the {{Map<String,
String> nodeLabels}} in {{EvaluatorRequest.Builder}}.

Example(YARN)
{code:java}
NodeLabelTestDriver.this.evaluatorRequestor.submit(EvaluatorRequest.newBuilder()
    .setNumber(1)
    .setMemory(64)
    .setNumberOfCores(1)
    .setNodeLabels(YarnUtilities.REEF_YARN_NODE_LABEL_EXPRESSION, "mylabel")
    .build());
{code}

Example(Mesos)
{code:java}
NodeLabelTestDriver.this.evaluatorRequestor.submit(EvaluatorRequest.newBuilder()
    .setNumber(1)
    .setMemory(64)
    .setNumberOfCores(1)
    .setNodeLabels("key1", "label1")
    .setNodeLabels("key2", "label2")
    .build());
{code}

After submitting an EvaluatorRequest, ResourceRequestHandler for each resource manager handles
it.
* YarnResourceRequestHandler: Pass the label to YarnClient.
* MesosResourceRequestHandler: Let REEFScheduler reject the Offers that don’t have matching
node label(attribute).



> Enable YARN Node Labels
> -----------------------
>
>                 Key: REEF-1750
>                 URL: https://issues.apache.org/jira/browse/REEF-1750
>             Project: REEF
>          Issue Type: New Feature
>          Components: REEF Runtime YARN
>            Reporter: Yunseong Lee
>            Assignee: Seokchan Ahn
>            Priority: Minor
>              Labels: gsoc2017
>         Attachments: capacity-scheduler.xml, masters, slaves, yarn-site.xml
>
>
> YARN's Node Labels (https://hadoop.apache.org/docs/r2.7.2/hadoop-yarn/hadoop-yarn-site/NodeLabel.html)
allow users to group resources with similar characteristics or with similar ACL policies (e.g.,
'gpu' for the nodes that have GPUs, TEAMNAME for the nodes that are owned by a team). 
> Users can specify which type of resources they want to request by setting the label.
> It will be useful if REEF Runtime YARN supports this feature.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message