Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-5118

Publish the helper functions in test/mesos.hpp

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • c++ api
    • None

    Description

      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.

      // 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;
      }
      

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

      cc mcypark

      Attachments

        Activity

          People

            Unassigned Unassigned
            klaus1982 Klaus Ma
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: