You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Klaus Ma <kl...@cguru.net> on 2015/08/06 10:03:34 UTC

Review Request 37168: MESOS-3063

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37168/
-----------------------------------------------------------

Review request for mesos.


Bugs: MESOS-3063
    https://issues.apache.org/jira/browse/MESOS-3063


Repository: mesos


Description
-------

MESOS-3063 (Add an example framework using dynamic reservation)


Diffs
-----

  src/examples/dynamic_reservation_executor.cpp PRE-CREATION 
  src/examples/dynamic_reservation_framework.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/37168/diff/


Testing
-------

#### Test Steps

Build the example and run in local Mesos cluster

#### Example Output

    I0806 15:19:33.955976 17033 sched.cpp:640] Framework registered with 20150805-204038-16842879-5050-14289-0015
    Registered!
    Received offer 20150805-204038-16842879-5050-14289-O161 with mem(*):2862; disk(*):460240; ports(*):[31000-32000]; cpus(*):4
    Reserve resources cpus(test, dynamic-reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
    Received offer 20150805-204038-16842879-5050-14289-O162 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-  reservation-framework-cpp):128
    Launching task 0 using offer 20150805-204038-16842879-5050-14289-O162
    Task 0 is in state TASK_FINISHED
    Received offer 20150805-204038-16842879-5050-14289-O163 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
    Launching task 1 using offer 20150805-204038-16842879-5050-14289-O163
    Task 1 is in state TASK_FINISHED
    Received offer 20150805-204038-16842879-5050-14289-O164 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
    Launching task 2 using offer 20150805-204038-16842879-5050-14289-O164
    Task 2 is in state TASK_FINISHED
    Received offer 20150805-204038-16842879-5050-14289-O165 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
    Launching task 3 using offer 20150805-204038-16842879-5050-14289-O165
    Task 3 is in state TASK_FINISHED
    Received offer 20150805-204038-16842879-5050-14289-O166 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
    Launching task 4 using offer 20150805-204038-16842879-5050-14289-O166
    Task 4 is in state TASK_FINISHED
    Received offer 20150805-204038-16842879-5050-14289-O167 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
    Unreserve resources cpus(test, dynamic-reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
    Received offer 20150805-204038-16842879-5050-14289-O168 with mem(*):2862; disk(*):460240; ports(*):[31000-32000]; cpus(*):4
    I0806 15:19:49.515024 17031 sched.cpp:1748] Asked to stop the driver
    I0806 15:19:49.515115 17031 sched.cpp:1032] Stopping framework '20150805-204038-16842879-5050-14289-0015'
    I0806 15:19:49.515630 17027 sched.cpp:1748] Asked to stop the driver
    2015-08-06 15:19:49,516:17027(0x7f23f610d700):ZOO_INFO@zookeeper_close@2505: Closing zookeeper sessionId=0x34da910aab20058 to [9.111.159.76:2181]


Thanks,

Klaus Ma


Re: Review Request 37168: MESOS-3063

Posted by haosdent huang <ha...@gmail.com>.

> On Aug. 13, 2015, 2:56 a.m., haosdent huang wrote:
> >

Hi, @klaus1982 Thanks you for you nice example. I think you need add your Shepherd as reviewer in this patch.


- haosdent


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37168/#review95227
-----------------------------------------------------------


On Aug. 6, 2015, 8:03 a.m., Klaus Ma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37168/
> -----------------------------------------------------------
> 
> (Updated Aug. 6, 2015, 8:03 a.m.)
> 
> 
> Review request for mesos.
> 
> 
> Bugs: MESOS-3063
>     https://issues.apache.org/jira/browse/MESOS-3063
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> MESOS-3063 (Add an example framework using dynamic reservation)
> 
> 
> Diffs
> -----
> 
>   src/examples/dynamic_reservation_executor.cpp PRE-CREATION 
>   src/examples/dynamic_reservation_framework.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/37168/diff/
> 
> 
> Testing
> -------
> 
> #### Test Steps
> 
> Build the example and run in local Mesos cluster
> 
> #### Example Output
> 
>     I0806 15:19:33.955976 17033 sched.cpp:640] Framework registered with 20150805-204038-16842879-5050-14289-0015
>     Registered!
>     Received offer 20150805-204038-16842879-5050-14289-O161 with mem(*):2862; disk(*):460240; ports(*):[31000-32000]; cpus(*):4
>     Reserve resources cpus(test, dynamic-reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Received offer 20150805-204038-16842879-5050-14289-O162 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-  reservation-framework-cpp):128
>     Launching task 0 using offer 20150805-204038-16842879-5050-14289-O162
>     Task 0 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O163 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 1 using offer 20150805-204038-16842879-5050-14289-O163
>     Task 1 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O164 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 2 using offer 20150805-204038-16842879-5050-14289-O164
>     Task 2 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O165 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 3 using offer 20150805-204038-16842879-5050-14289-O165
>     Task 3 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O166 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 4 using offer 20150805-204038-16842879-5050-14289-O166
>     Task 4 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O167 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Unreserve resources cpus(test, dynamic-reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Received offer 20150805-204038-16842879-5050-14289-O168 with mem(*):2862; disk(*):460240; ports(*):[31000-32000]; cpus(*):4
>     I0806 15:19:49.515024 17031 sched.cpp:1748] Asked to stop the driver
>     I0806 15:19:49.515115 17031 sched.cpp:1032] Stopping framework '20150805-204038-16842879-5050-14289-0015'
>     I0806 15:19:49.515630 17027 sched.cpp:1748] Asked to stop the driver
>     2015-08-06 15:19:49,516:17027(0x7f23f610d700):ZOO_INFO@zookeeper_close@2505: Closing zookeeper sessionId=0x34da910aab20058 to [9.111.159.76:2181]
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>


Re: Review Request 37168: MESOS-3063

Posted by Klaus Ma <kl...@cguru.net>.

> On Aug. 13, 2015, 2:56 a.m., haosdent huang wrote:
> >
> 
> haosdent huang wrote:
>     Hi, @klaus1982 Thanks you for you nice example. I think you need add your Shepherd as reviewer in this patch.

Agree :). I have added Michael as reviewer.


- Klaus


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37168/#review95227
-----------------------------------------------------------


On Aug. 28, 2015, 3:31 a.m., Klaus Ma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37168/
> -----------------------------------------------------------
> 
> (Updated Aug. 28, 2015, 3:31 a.m.)
> 
> 
> Review request for mesos and Michael Park.
> 
> 
> Bugs: MESOS-3063
>     https://issues.apache.org/jira/browse/MESOS-3063
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> MESOS-3063 (Add an example framework using dynamic reservation)
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 7b620ff 
>   src/examples/dynamic_reservation_executor.cpp PRE-CREATION 
>   src/examples/dynamic_reservation_framework.cpp PRE-CREATION 
>   src/tests/dynamic_reservation_framework_test.sh PRE-CREATION 
>   src/tests/examples_tests.cpp 3f56b30 
>   src/tests/flags.hpp 3644956 
>   src/tests/script.cpp bcc1fab 
> 
> Diff: https://reviews.apache.org/r/37168/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>


Re: Review Request 37168: MESOS-3063

Posted by Klaus Ma <kl...@cguru.net>.

> On 八月 13, 2015, 2:56 a.m., haosdent huang wrote:
> > src/examples/dynamic_reservation_framework.cpp, line 343
> > <https://reviews.apache.org/r/37168/diff/1/?file=1033410#file1033410line343>
> >
> >     Does we need add 
> >     ```
> >     logging::initialize(argv[0], flags, true);
> >     ```
> >     here?

logging is an internal tools. In this example, i'm trying to avoid using internal classes; so user can build this example from installed Mesos, which is better practice for the user :).


> On 八月 13, 2015, 2:56 a.m., haosdent huang wrote:
> > src/examples/dynamic_reservation_framework.cpp, line 278
> > <https://reviews.apache.org/r/37168/diff/1/?file=1033410#file1033410line278>
> >
> >     Could we change the style here to make it looks better? :-)

sure, I copied this from other example; anyway, I'll check the style :).


- Klaus


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37168/#review95227
-----------------------------------------------------------


On 八月 6, 2015, 8:03 a.m., Klaus Ma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37168/
> -----------------------------------------------------------
> 
> (Updated 八月 6, 2015, 8:03 a.m.)
> 
> 
> Review request for mesos.
> 
> 
> Bugs: MESOS-3063
>     https://issues.apache.org/jira/browse/MESOS-3063
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> MESOS-3063 (Add an example framework using dynamic reservation)
> 
> 
> Diffs
> -----
> 
>   src/examples/dynamic_reservation_executor.cpp PRE-CREATION 
>   src/examples/dynamic_reservation_framework.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/37168/diff/
> 
> 
> Testing
> -------
> 
> #### Test Steps
> 
> Build the example and run in local Mesos cluster
> 
> #### Example Output
> 
>     I0806 15:19:33.955976 17033 sched.cpp:640] Framework registered with 20150805-204038-16842879-5050-14289-0015
>     Registered!
>     Received offer 20150805-204038-16842879-5050-14289-O161 with mem(*):2862; disk(*):460240; ports(*):[31000-32000]; cpus(*):4
>     Reserve resources cpus(test, dynamic-reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Received offer 20150805-204038-16842879-5050-14289-O162 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-  reservation-framework-cpp):128
>     Launching task 0 using offer 20150805-204038-16842879-5050-14289-O162
>     Task 0 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O163 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 1 using offer 20150805-204038-16842879-5050-14289-O163
>     Task 1 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O164 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 2 using offer 20150805-204038-16842879-5050-14289-O164
>     Task 2 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O165 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 3 using offer 20150805-204038-16842879-5050-14289-O165
>     Task 3 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O166 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 4 using offer 20150805-204038-16842879-5050-14289-O166
>     Task 4 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O167 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Unreserve resources cpus(test, dynamic-reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Received offer 20150805-204038-16842879-5050-14289-O168 with mem(*):2862; disk(*):460240; ports(*):[31000-32000]; cpus(*):4
>     I0806 15:19:49.515024 17031 sched.cpp:1748] Asked to stop the driver
>     I0806 15:19:49.515115 17031 sched.cpp:1032] Stopping framework '20150805-204038-16842879-5050-14289-0015'
>     I0806 15:19:49.515630 17027 sched.cpp:1748] Asked to stop the driver
>     2015-08-06 15:19:49,516:17027(0x7f23f610d700):ZOO_INFO@zookeeper_close@2505: Closing zookeeper sessionId=0x34da910aab20058 to [9.111.159.76:2181]
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>


Re: Review Request 37168: MESOS-3063

Posted by haosdent huang <ha...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37168/#review95227
-----------------------------------------------------------



src/examples/dynamic_reservation_framework.cpp (line 267)
<https://reviews.apache.org/r/37168/#comment150072>

    Need use this style:
    ```
    enum State
    {
    ```



src/examples/dynamic_reservation_framework.cpp (line 278)
<https://reviews.apache.org/r/37168/#comment150070>

    Could we change the style here to make it looks better? :-)



src/examples/dynamic_reservation_framework.cpp (line 343)
<https://reviews.apache.org/r/37168/#comment150065>

    Does we need add 
    ```
    logging::initialize(argv[0], flags, true);
    ```
    here?


- haosdent huang


On Aug. 6, 2015, 8:03 a.m., Klaus Ma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37168/
> -----------------------------------------------------------
> 
> (Updated Aug. 6, 2015, 8:03 a.m.)
> 
> 
> Review request for mesos.
> 
> 
> Bugs: MESOS-3063
>     https://issues.apache.org/jira/browse/MESOS-3063
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> MESOS-3063 (Add an example framework using dynamic reservation)
> 
> 
> Diffs
> -----
> 
>   src/examples/dynamic_reservation_executor.cpp PRE-CREATION 
>   src/examples/dynamic_reservation_framework.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/37168/diff/
> 
> 
> Testing
> -------
> 
> #### Test Steps
> 
> Build the example and run in local Mesos cluster
> 
> #### Example Output
> 
>     I0806 15:19:33.955976 17033 sched.cpp:640] Framework registered with 20150805-204038-16842879-5050-14289-0015
>     Registered!
>     Received offer 20150805-204038-16842879-5050-14289-O161 with mem(*):2862; disk(*):460240; ports(*):[31000-32000]; cpus(*):4
>     Reserve resources cpus(test, dynamic-reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Received offer 20150805-204038-16842879-5050-14289-O162 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-  reservation-framework-cpp):128
>     Launching task 0 using offer 20150805-204038-16842879-5050-14289-O162
>     Task 0 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O163 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 1 using offer 20150805-204038-16842879-5050-14289-O163
>     Task 1 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O164 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 2 using offer 20150805-204038-16842879-5050-14289-O164
>     Task 2 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O165 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 3 using offer 20150805-204038-16842879-5050-14289-O165
>     Task 3 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O166 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 4 using offer 20150805-204038-16842879-5050-14289-O166
>     Task 4 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O167 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Unreserve resources cpus(test, dynamic-reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Received offer 20150805-204038-16842879-5050-14289-O168 with mem(*):2862; disk(*):460240; ports(*):[31000-32000]; cpus(*):4
>     I0806 15:19:49.515024 17031 sched.cpp:1748] Asked to stop the driver
>     I0806 15:19:49.515115 17031 sched.cpp:1032] Stopping framework '20150805-204038-16842879-5050-14289-0015'
>     I0806 15:19:49.515630 17027 sched.cpp:1748] Asked to stop the driver
>     2015-08-06 15:19:49,516:17027(0x7f23f610d700):ZOO_INFO@zookeeper_close@2505: Closing zookeeper sessionId=0x34da910aab20058 to [9.111.159.76:2181]
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>


Re: Review Request 37168: MESOS-3063

Posted by Klaus Ma <kl...@cguru.net>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37168/
-----------------------------------------------------------

(Updated 八月 27, 2015, 3:33 a.m.)


Review request for mesos.


Bugs: MESOS-3063
    https://issues.apache.org/jira/browse/MESOS-3063


Repository: mesos


Description
-------

MESOS-3063 (Add an example framework using dynamic reservation)


Diffs (updated)
-----

  src/Makefile.am 7b620ff 
  src/examples/dynamic_reservation_executor.cpp PRE-CREATION 
  src/examples/dynamic_reservation_framework.cpp PRE-CREATION 
  src/tests/dynamic_reservation_framework_test.sh PRE-CREATION 
  src/tests/examples_tests.cpp 3f56b30 
  src/tests/flags.hpp 3644956 
  src/tests/script.cpp bcc1fab 

Diff: https://reviews.apache.org/r/37168/diff/


Testing (updated)
-------

make
make check


Thanks,

Klaus Ma


Re: Review Request 37168: MESOS-3063

Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37168/#review94390
-----------------------------------------------------------


Patch looks great!

Reviews applied: [37168]

All tests passed.

- Mesos ReviewBot


On Aug. 6, 2015, 8:03 a.m., Klaus Ma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37168/
> -----------------------------------------------------------
> 
> (Updated Aug. 6, 2015, 8:03 a.m.)
> 
> 
> Review request for mesos.
> 
> 
> Bugs: MESOS-3063
>     https://issues.apache.org/jira/browse/MESOS-3063
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> MESOS-3063 (Add an example framework using dynamic reservation)
> 
> 
> Diffs
> -----
> 
>   src/examples/dynamic_reservation_executor.cpp PRE-CREATION 
>   src/examples/dynamic_reservation_framework.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/37168/diff/
> 
> 
> Testing
> -------
> 
> #### Test Steps
> 
> Build the example and run in local Mesos cluster
> 
> #### Example Output
> 
>     I0806 15:19:33.955976 17033 sched.cpp:640] Framework registered with 20150805-204038-16842879-5050-14289-0015
>     Registered!
>     Received offer 20150805-204038-16842879-5050-14289-O161 with mem(*):2862; disk(*):460240; ports(*):[31000-32000]; cpus(*):4
>     Reserve resources cpus(test, dynamic-reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Received offer 20150805-204038-16842879-5050-14289-O162 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-  reservation-framework-cpp):128
>     Launching task 0 using offer 20150805-204038-16842879-5050-14289-O162
>     Task 0 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O163 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 1 using offer 20150805-204038-16842879-5050-14289-O163
>     Task 1 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O164 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 2 using offer 20150805-204038-16842879-5050-14289-O164
>     Task 2 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O165 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 3 using offer 20150805-204038-16842879-5050-14289-O165
>     Task 3 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O166 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Launching task 4 using offer 20150805-204038-16842879-5050-14289-O166
>     Task 4 is in state TASK_FINISHED
>     Received offer 20150805-204038-16842879-5050-14289-O167 with mem(*):2734; disk(*):460240; ports(*):[31000-32000]; cpus(*):3; cpus(test, dynamic-    reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Unreserve resources cpus(test, dynamic-reservation-framework-cpp):1; mem(test, dynamic-reservation-framework-cpp):128
>     Received offer 20150805-204038-16842879-5050-14289-O168 with mem(*):2862; disk(*):460240; ports(*):[31000-32000]; cpus(*):4
>     I0806 15:19:49.515024 17031 sched.cpp:1748] Asked to stop the driver
>     I0806 15:19:49.515115 17031 sched.cpp:1032] Stopping framework '20150805-204038-16842879-5050-14289-0015'
>     I0806 15:19:49.515630 17027 sched.cpp:1748] Asked to stop the driver
>     2015-08-06 15:19:49,516:17027(0x7f23f610d700):ZOO_INFO@zookeeper_close@2505: Closing zookeeper sessionId=0x34da910aab20058 to [9.111.159.76:2181]
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>