> On June 1, 2015, 8:55 p.m., Jie Yu wrote: > > src/tests/module.hpp, lines 76-84 > > <https://reviews.apache.org/r/34662/diff/11/?file=975514#file975514line76> > > > > Not your fault. But I found this very unintuitive. It takes me quite a > > while to figure out why we need this. > > > > It would be more intuitive if we used template specification. > > > > ``` > > template <ResourceEstimator, TestNoopResourceEstimator> > > class Module > > { > > static Try<ResourceEstimator*> create(const Option<std::string>& type) > > { > > ... > > } > > }; > > ``` > > Niklas Nielsen wrote: > When we don't type param the test, we won't need this overload (as far as > I can grasp).
True. But "Try<T*> create(logging::Flags flags)" has the same issue. I cannot not tell what this function is used for (i.e., which module). We don't have to solve it in this review. Just some thoughts on readability:) - Jie ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34662/#review86068 ----------------------------------------------------------- On June 1, 2015, 6:13 a.m., Bartek Plotka wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/34662/ > ----------------------------------------------------------- > > (Updated June 1, 2015, 6:13 a.m.) > > > Review request for mesos, Jie Yu, Niklas Nielsen, Szymon Konefal, and Vinod > Kone. > > > Bugs: MESOS-2650 > https://issues.apache.org/jira/browse/MESOS-2650 > > > Repository: mesos > > > Description > ------- > > Added *ResourceEstimator* (RE) module interface. > Added *TestResourceEstimator* example module. > Added *TestNoopResourceEstimator* module to typed_tests in > *oversubscription_tests.cpp* > > > Diffs > ----- > > include/mesos/module/resource_estimator.hpp PRE-CREATION > src/Makefile.am 9d1f0d5de2e7647a6677d86f5032ae1b79f1b241 > src/examples/test_resource_estimator_module.cpp PRE-CREATION > src/module/manager.cpp 5fed1aa82f72aa55c8e4e946f5f458ee357162be > src/tests/module.hpp c379f01ae4e185960b8710b6a10626a3b8784fc8 > src/tests/module.cpp c4f811998aef14ab247380318fab79f18672ab29 > src/tests/oversubscription_tests.cpp > ea5857cb579aa904fd05530684bdde51a0b3f27f > > Diff: https://reviews.apache.org/r/34662/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Bartek Plotka > >