hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantinos Karanasos (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-1042) add ability to specify affinity/anti-affinity in container requests
Date Fri, 09 Dec 2016 01:02:38 GMT

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

Konstantinos Karanasos commented on YARN-1042:
----------------------------------------------

Hi [~leftnoteasy]. Thanks for working on this. Being able to specify (anti-)affinity constraints
is a feature that we are very interested in as well.
I gave a quick look at your patch. As I mentioned to you in the past, we also have a working
prototype for defining and imposing similar constraints (I had uploaded an initial version
of it at YARN-4902 some time back). We can share more code if it helps.

For now let's focus on the API -- we can later discuss how to make the scheduling efficient
(e.g., using the global scheduling and so on).

I would suggest to unify the affinity and anti-affinity constraints and make them a bit more
general too. For instance, we can specify "cardinality" constraints of the form "put no more
than 4 HBase masters at each rack". This constraint is useful but cannot be captured by pure
affinity or anti-affinity constraints.
I assume that its task can be associated with a set of labels (similar to the ones we are
discussing in YARN-3409). This is not there at the moment, but can be added.
Then, we could use the following placement constraint form: {noformat} {task, target-tasks,
cluster-scope, min-cardinality, max-cardinality}. {noformat}
In the above constraint, {{task}} is a specific task, {{target-tasks}} is a label (e.g., "HBase-master",
"app_000123" or "latency-critical") that specifies a set of tasks that are already scheduled
in the cluster, {{cluster-scope}} is something among NODE and RACK (and possibly others in
the future), {{min-cardinality}} is the minimum number of tasks with label {{target-tasks}}
that can appear at the same {{cluster-scope}} with {{task}}, and {{max-cardinality}} is the
respective maximum cardinality.
Using the {{min-}} and {{max-cardinality}}, we can specify affinity, anti-affinity and other
cardinality constraints.

For example, {task_001, "HBase-master", NODE, 1, 1} is an anti-affinity constraint (don't
put more than one HBase master at a node. 
Likewise, {task_001, "HBase-region-server", NODE, 2, MAX_INT} is an affinity constraint for
region servers.

Let me know how it looks.

> add ability to specify affinity/anti-affinity in container requests
> -------------------------------------------------------------------
>
>                 Key: YARN-1042
>                 URL: https://issues.apache.org/jira/browse/YARN-1042
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>    Affects Versions: 3.0.0-alpha1
>            Reporter: Steve Loughran
>            Assignee: Wangda Tan
>         Attachments: YARN-1042-demo.patch, YARN-1042-design-doc.pdf, YARN-1042-global-scheduling.poc.1.patch,
YARN-1042.001.patch, YARN-1042.002.patch
>
>
> container requests to the AM should be able to request anti-affinity to ensure that things
like Region Servers don't come up on the same failure zones. 
> Similarly, you may be able to want to specify affinity to same host or rack without specifying
which specific host/rack. Example: bringing up a small giraph cluster in a large YARN cluster
would benefit from having the processes in the same rack purely for bandwidth reasons.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message