----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29918/#review69076 -----------------------------------------------------------
include/mesos/resources.hpp <https://reviews.apache.org/r/29918/#comment113708> Why do you need this? The operator below is not sufficient? src/slave/state.hpp <https://reviews.apache.org/r/29918/#comment113655> Wrap comment in 70 char width. src/slave/state.hpp <https://reviews.apache.org/r/29918/#comment113719> T can be string, protobuf message and repeated protobuf messages. src/slave/state.hpp <https://reviews.apache.org/r/29918/#comment113712> We usually declare the variable while we are using them. ``` // Create the base directory. Try<Nothing> mkdir = os::mkdir(...); if (mkdir.isError()) { } ... ``` src/slave/state.hpp <https://reviews.apache.org/r/29918/#comment113713> s/file/temp/? src/slave/state.hpp <https://reviews.apache.org/r/29918/#comment113709> Could you please create an internal::write template and use template specification to dispatch to appropriate write depending on the type of the data? src/slave/state.hpp <https://reviews.apache.org/r/29918/#comment113714> ``` Try<Nothing> write = internal::write(temp.get(), t); if (write.isError()) { ... } ``` src/slave/state.hpp <https://reviews.apache.org/r/29918/#comment113716> ``` Try<Nothing> rename = os::rename(...); ``` src/tests/slave_recovery_tests.cpp <https://reviews.apache.org/r/29918/#comment113721> Add a blank line below. src/tests/slave_recovery_tests.cpp <https://reviews.apache.org/r/29918/#comment113722> Add a blank line below. Aha, now I see why you need 'get()' function above. It would be better if checkpoint can support Resources directly as we will use it in the code pretty frequently. How about add a specialization for internal::write I mentioned above for Resources? src/tests/slave_recovery_tests.cpp <https://reviews.apache.org/r/29918/#comment113720> Feel free to using google::protobuf::RepeatedPtrField in the begining. src/tests/slave_recovery_tests.cpp <https://reviews.apache.org/r/29918/#comment113723> Add a blank line above. - Jie Yu On Jan. 21, 2015, 10:08 p.m., Michael Park wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/29918/ > ----------------------------------------------------------- > > (Updated Jan. 21, 2015, 10:08 p.m.) > > > Review request for mesos, Adam B, Benjamin Hindman, Ben Mahler, Jie Yu, and > Vinod Kone. > > > Repository: mesos-git > > > Description > ------- > > Introduced a generic checkpoint function. > > > Diffs > ----- > > include/mesos/resources.hpp 7935e7f9bfe66d1900594dcdcb800c4593a3940f > src/slave/state.hpp 70777cf6ab681c29ca4df601fe47903e1dbdf41f > src/slave/state.cpp a36fa53099300ee03f051b0f5eaaafe9f1da68d1 > src/tests/slave_recovery_tests.cpp 809822e63b05a21418cd9297c927d656d6fd871d > > Diff: https://reviews.apache.org/r/29918/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Michael Park > >