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

Chad Heuschober edited comment on MESOS-3372 at 9/8/15 4:09 AM:
----------------------------------------------------------------

Right. This particular issue isn't about scheduling, through -- the offer of 
the attributes doesn't necessarily help inject them into the environment of a 
running task unless the framework is built to do that. Perhaps a better way to 
ask the question is: 

_If I created a task with 4 instances, run on 4 different slaves that, when 
executed, would echo each unique slave's attributes, what would be the best way 
to achieve that?_

Considering that each of my slaves may have a different value set for their 
attributes, this is not something that can be statically set in a single task 
definition. The injection of the slave attributes has to happen after the 
initial request by the framework and after the offer has been accepted but 
before it has been executed. This could either be code that has to be written 
into the framework that would modify TaskInfo to inject those attributes or 
code written into the executor that would modify TaskInfo to inject the 
attributes. Both are acceptable places to template in these parameters but the 
value of having this feature in the executor is that it's a feature that can be 
used across multiple frameworks and doesn't have to be written into each one.


was (Author: cheuschober):
Right. This particular issue isn't about scheduling, through -- the offer of 
the attributes doesn't necessarily help inject them into the environment of a 
running task unless the framework is built to do that. Perhaps a better way to 
ask the question is: 

_If I created a task with 4 instances, run on 4 different slaves that, when 
executed, would echo each unique slave's attributes, what would be the best way 
to achieve that?_

Considering that each of my slaves may have a different value set for their 
attributes, this is not something that can be statically set in a single task 
definition. The injection of the slave attributes has to happen after the 
initial request by the framework and after the offer has been accepted but 
before it has been executed. This could either be code that has to be written 
into the framework that would modify TaskInfo to inject those attributes or 
code written into the executor that would modify TaskInfo to inject the 
attributes. Both are acceptable places to template in these parameters but the 
value of having this data in the executor is that it's a feature that can be 
used across multiple frameworks and doesn't have to be written into each one.

> Allow mesos agent attributes to be tokenized in taskInfo
> --------------------------------------------------------
>
>                 Key: MESOS-3372
>                 URL: https://issues.apache.org/jira/browse/MESOS-3372
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Chad Heuschober
>
> Some applications workloads would benefit from having access to the 
> statically defined slave attributes. By processing `taskInfo` on the slave 
> such tokens, as defined in `taskInfo` could be replaced with the appropriate 
> values to achieve such objectives as rack locality.
> Example:
> Before token replacement:
> {code}
> {
>   "discovery": {
>     "environment": "[email protected]_ID@"
>   }
> }
> {code}
> After token replacement:
> {code}
> {
>   "discovery": {
>     "environment": "RACK_DC131R57"
>   }
> }
> {code}



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

Reply via email to