mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anindya Sinha <anindya_si...@apple.com>
Subject Re: Review Request 51879: Autodetect value of resource when not specified in static resources.
Date Sat, 10 Dec 2016 01:19:38 GMT


> On Nov. 30, 2016, 8:51 a.m., Jiang Yan Xu wrote:
> > src/common/resources.cpp, line 1927
> > <https://reviews.apache.org/r/51879/diff/10/?file=1545305#file1545305line1927>
> >
> >     No empty lines here.

Ok. Although I do see patterns without { } and / or with empty lines.


> On Nov. 30, 2016, 8:51 a.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/containerizer.cpp, line 150
> > <https://reviews.apache.org/r/51879/diff/10/?file=1545306#file1545306line150>
> >
> >     Use `Option<string> path;` followed by `CHECK_SOME(path)` after all branches
that set it?

Since `path` is set in all branches, I do not think we need an `Option<string>`, and
hence no need for `CHECK_SOME()`. Right?


> On Nov. 30, 2016, 8:51 a.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/containerizer.cpp, line 297
> > <https://reviews.apache.org/r/51879/diff/10/?file=1545306#file1545306line297>
> >
> >     Where are the custom resources added to the result?

Added now.


> On Nov. 30, 2016, 8:51 a.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/containerizer.cpp, line 304
> > <https://reviews.apache.org/r/51879/diff/10/?file=1545306#file1545306line304>
> >
> >     "except gpus" is not true? Yes it's delegates to another class but the logic
is essentially the same there as well.

I will calirify the comment. I meant to say that we do not autodetect `gpus` resources.


- Anindya


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


On Dec. 10, 2016, 1:19 a.m., Anindya Sinha wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51879/
> -----------------------------------------------------------
> 
> (Updated Dec. 10, 2016, 1:19 a.m.)
> 
> 
> Review request for mesos and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-6062
>     https://issues.apache.org/jira/browse/MESOS-6062
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When static resources indicate resources with a positive size, we use
> that for the resources on the agent. However, --resources can include
> resources with no size, which indicates that mesos agent determine the
> size of those resources from the agent and uses that information. Note
> that auto-detection of resources is allowed for all known resource
> types except "gpus" (i.e. "cpus", "mem", "disk" and "ports") when
> represented in JSON format only. Auto-detection is not done when the
> resources are represented in text format.
> 
> With this change, JSON representation for disk resources that do not
> specify any value would not result in an error, but those resources
> will not be accounted for until a valid size is determined for such
> resources. A scalar value of -1 still results in an invalid resource.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp f569c931ff7db8d51dfd7c96f4f2addab05df85d 
>   include/mesos/v1/resources.hpp f60ab794a0c7c24885c49cc47b798c363e3279e7 
>   src/common/resources.cpp 4bb9beffcb3509f4226b4985e05eccec01412d0f 
>   src/slave/containerizer/containerizer.cpp d46882baa904fd439bffb23c324828b777228f1c

>   src/slave/containerizer/mesos/isolators/gpu/allocator.cpp 2e722691475c84afae14009014ea70cc0fdd0e65

>   src/v1/resources.cpp 46cc00f2f453f5eb4ddc4b0b9b89be2bd89f05d9 
> 
> Diff: https://reviews.apache.org/r/51879/diff/
> 
> 
> Testing
> -------
> 
> Tests passed.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message