> On 三月 15, 2016, 12:26 p.m., Guangya Liu wrote:
> > src/cli/execute.cpp, lines 216-222
> > <https://reviews.apache.org/r/43935/diff/1/?file=1299410#file1299410line216>
> >
> >     Do you mean that here the framework task can only use reserved 
> > resources if the framework has a role? What about regular resources?
> >     
> >     What about adding some logic as this:
> >     1) First use reserved resources for a role
> >     2) If no reserved resources, use regular resources?

resources.find() actually find the resources in the target role, then 
unreserved resources.


- Jian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43935/#review123644
-----------------------------------------------------------


On 三月 15, 2016, 2:07 p.m., Jian Qiu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43935/
> -----------------------------------------------------------
> 
> (Updated 三月 15, 2016, 2:07 p.m.)
> 
> 
> Review request for mesos, Greg Mann, Shuai Lin, and Michael Park.
> 
> 
> Bugs: MESOS-4744
>     https://issues.apache.org/jira/browse/MESOS-4744
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Allow setting role in mesos-execute.
> 
> 
> Diffs
> -----
> 
>   src/cli/execute.cpp ed42cb568f3d16856f48b3bbd354cb2b0fb83e8e 
> 
> Diff: https://reviews.apache.org/r/43935/diff/
> 
> 
> Testing
> -------
> 
> start master.
> ./bin/mesos-master.sh --work_dir=/tmp/mesos
> 
> start slave.
> ./bin/mesos-slave.sh --work_dir=/tmp/mesos --master=192.168.99.1:5050 
> --resources="cpus:1;cpus(test):1;mem:7500;mem(test):7500"
> 
> running mesos-execute without specifying role succeeds.
> ./src/mesos-execute --master=192.168.99.1:5050 --name="test" --command="sleep 
> 10" --resources="cpus:1;mem:512"
> 
> running mesos-execute with role test succeeds.
> ./src/mesos-execute --master=192.168.99.1:5050 --name="test" --command="sleep 
> 10" --role="test" --resources="cpus:2;mem:512"
> 
> running mesos-execute with role test1 fails.
> ./src/mesos-execute --master=192.168.99.1:5050 --name="test" --command="sleep 
> 10" --role="test1" --resources="cpus:2;mem:512"
> 
> 
> Thanks,
> 
> Jian Qiu
> 
>

Reply via email to