Klaus Ma created MESOS-5118:
-------------------------------

             Summary: Publish the helper functions in test/mesos.hpp
                 Key: MESOS-5118
                 URL: https://issues.apache.org/jira/browse/MESOS-5118
             Project: Mesos
          Issue Type: Bug
          Components: c++ api
            Reporter: Klaus Ma


During the review of MESOS-3063 (Example of Dynamic Reservation), we found 
several helper functions are duplicated if de-coupled example from internal 
codes.

For example, there is a helper function named {{UNRESERVE(const Resources& 
resources)}} in {{src/tests/mesos.hpp}}. But we can not use it to compile 
example code with installed Mesos binaries & headers.

{code}
// Helpers for creating unreserve operations.
inline Offer::Operation UNRESERVE(const Resources& resources)
{
  Offer::Operation operation;
  operation.set_type(Offer::Operation::UNRESERVE);
  operation.mutable_unreserve()->mutable_resources()->CopyFrom(resources);
  return operation;
}
{code}

The proposal is to move such kind of helper functions into {{include/mesos/}}, 
so example, test and framework developer can reuse those helper functions. One 
concern is how to manage the compatibility of those helper functions.

cc [~mcypark]



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

Reply via email to