----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/55021/#review160217 -----------------------------------------------------------
src/common/protobuf_utils.hpp (line 209) <https://reviews.apache.org/r/55021/#comment231313> You may need a default constructor for `Capabilities` here, otherwise, the `hierarhical.cpp` will be failed when construct the `Framework`. src/common/protobuf_utils.hpp (line 212) <https://reviews.apache.org/r/55021/#comment231311> s/cap/capability Mesos perfer using long name which is easy to understand. src/common/protobuf_utils.hpp (lines 238 - 243) <https://reviews.apache.org/r/55021/#comment231314> I'd like we keep a comment for each of the capability here and also keep the variable same as before. ``` // Whether the framework desires revocable resources. bool revocable = false; // Whether the framework can receive TASK_KILLING TaskState // when a task is being killed. bool taskKillingAware = false; // Whether the framework is aware of GPU resources. See // the documentation for the GPU_RESOURCES Capability. bool gpuAware = false; // Whether the framework desires shared resources. bool shared = false; // Whether the framework is prepared to handle the following // TaskStates: TASK_UNREACHABLE, TASK_DROPPED, TASK_GONE, // TASK_GONE_BY_OPERATOR, and TASK_UNKNOWN, and whether the // framework will assume responsibility for managing // partitioned tasks that reregister with the master. bool partitionAware = false; // Whether the framework support `multi-tenancy`. bool multiRole = false; ``` src/tests/protobuf_utils_tests.cpp (lines 78 - 83) <https://reviews.apache.org/r/55021/#comment231315> Group the TRUE and FALSE cases, also the variable names may need some update accoding to my above comments. ``` ASSERT_TRUE(capabilities.revocableResources); ASSERT_TRUE(capabilities.partitionAware); ASSERT_TRUE(capabilities.gpuResources); ASSERT_FALSE(capabilities.sharedResources); ASSERT_FALSE(capabilities.taskKillingState); ASSERT_FALSE(capabilities.multiRole); ``` - Guangya Liu On 十二月 28, 2016, 8:32 a.m., Jay Guo wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55021/ > ----------------------------------------------------------- > > (Updated 十二月 28, 2016, 8:32 a.m.) > > > Review request for mesos, Benjamin Bannier, Benjamin Mahler, and Guangya Liu. > > > Repository: mesos > > > Description > ------- > > Master, agent and allocator structs could use this stuct to easily > deal with Framework Capabilities. > > > Diffs > ----- > > src/common/protobuf_utils.hpp f225bb0f5196f7f4b12be25828361a38e1d42e60 > src/tests/protobuf_utils_tests.cpp 4ce952a7d3901a4362aa69f199b135b53d14a723 > > Diff: https://reviews.apache.org/r/55021/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Jay Guo > >
