> On April 7, 2014, 4:26 p.m., Tobias Weingartner wrote: > > src/common/resources.cpp, line 543 > > <https://reviews.apache.org/r/12365/diff/3/?file=323798#file323798line543> > > > > This is comparison of: > > > > <double> == 0 > > > > Which is likely somewhat ill defined. Thanks to: > > http://www.ebaytechblog.com/2014/04/04/delivering-ebays-ci-solution-with-apache-mesos-part-i/ > > > > For finding this. > >
Possible fix: https://github.com/asathye/mesos/commit/56c144f8cf48bb14c3f0fb639e9791170c1b6267 - Tobias ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/12365/#review39687 ----------------------------------------------------------- On July 19, 2013, 11:25 p.m., Thomas Marshall wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/12365/ > ----------------------------------------------------------- > > (Updated July 19, 2013, 11:25 p.m.) > > > Review request for mesos and Benjamin Hindman. > > > Bugs: MESOS-505 > https://issues.apache.org/jira/browse/MESOS-505 > > > Repository: mesos > > > Description > ------- > > One of the biggest potential problems with adding roles to resources is that > it significantly increases the complexity of dealing with resources for > scheduler writers - you end up in a situation where the Resources sent as > part of an offer may, for example, contain multiple cpu resources, each > marked with a different role, and you may want to launch tasks that use cpus > across roles. > > The solution for this is to provide the utilities of the Resources class for > use by scheduler writers. In particular, I've implemented a function called > findWithRoles that I believe covers the common case of launching tasks from > offers in a simple way - the idea is that a scheduler will construct a > Resources object representing the amount of resources it wants for a task but > not marked with roles. Then you call findWithRoles on the offer's resources > with the task's resources as the parameter. findWithRoles will return a > Resources object with the same total amount of resources as the parameter, > but with roles marked appropriately to match up with resources from the > offer, taking resources first from the role specified as a parameter to > findWithRoles, then from the default role, then from any other role. > test_framework.cpp is a good example of how this would work. > > > Diffs > ----- > > include/mesos/resources.hpp PRE-CREATION > include/mesos/values.hpp PRE-CREATION > src/Makefile.am 5d6f309 > src/common/attributes.hpp 63b45fd > src/common/resources.hpp 42dfb6a > src/common/resources.cpp 8bc1057 > src/common/type_utils.hpp 377b65f > src/common/values.hpp 64c138c > src/common/values.cpp 36e11d1 > src/examples/test_framework.cpp 2c46c24 > src/master/allocator.hpp 9fc802a > src/master/drf_sorter.hpp 80f4798 > src/master/hierarchical_allocator_process.hpp c959c3f > src/master/http.cpp b5c8db9 > src/master/master.hpp a076658 > src/slave/http.cpp dc2955f > src/slave/isolator.hpp 67effd3 > src/slave/slave.hpp c679447 > src/tests/gc_tests.cpp 1745800 > src/tests/isolator_tests.cpp a37f006 > src/tests/mesos.hpp 5cb5aa2 > src/tests/resources_tests.cpp 67a11b3 > src/tests/slave_recovery_tests.cpp b0843d7 > src/tests/sorter_tests.cpp 619e786 > src/tests/test_framework_test.sh f0d1ceb > src/tests/values_tests.cpp 729380f > > Diff: https://reviews.apache.org/r/12365/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Thomas Marshall > >
