You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Niklas Quarfot Nielsen (JIRA)" <ji...@apache.org> on 2015/06/04 03:23:38 UTC

[jira] [Created] (MESOS-2813) Clean up ::create() in Factory style classes

Niklas Quarfot Nielsen created MESOS-2813:
---------------------------------------------

             Summary: Clean up ::create() in Factory style classes
                 Key: MESOS-2813
                 URL: https://issues.apache.org/jira/browse/MESOS-2813
             Project: Mesos
          Issue Type: Improvement
            Reporter: Niklas Quarfot Nielsen


We have a few ways of providing arguments to static ::create() factories.

More specifically:

Allocator and authenticator (which were earlier then RE)
-Defined default value if no flag. (https://github.com/apache/mesos/blob/master/src/master/flags.cpp#L349)
-Allocator factory gets only const string name (not Option<>). We don't need to check if it's null.. (https://github.com/apache/mesos/blob/master/src/master/allocator/allocator.cpp#L37)
QoS Controller approach (and Jie Yu in https://reviews.apache.org/r/35028/diff/#)
-There is no default flag, but it's it catched in Option<> so it can be None()
-You have to check if it's None but we save space - we don't have to create default const in constant.hpp



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