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

(Updated Jan. 3, 2016, 1:29 a.m.)


Review request for mesos, Anand Mazumdar and Kapil Arya.


Changes
-------

Changed method name to `initialize()` to be consistent with other 
initialization methods.


Repository: mesos


Description
-------

Jira: [MESOS-4253](https://issues.apache.org/jira/browse/MESOS-4253)

To provide a basic "context" to Anonymous modules, we pass in the `BaseFlags`.

This tries to be backward compatible with existing modules, so a no-op 
(`virtual`) implementation of the method is provided in the base class.
Currently the code is only implemented in the Agent's `main()` method, but if 
deemed correct, adding it to Master is trivial.


Diffs (updated)
-----

  include/mesos/module/anonymous.hpp 629eb123b9d5fa9e07ddb1c704ee72e96e8fec5b 
  src/examples/test_anonymous_module.hpp 
3da33a42f04b7421cee8fbb85e29b66e352f5894 
  src/examples/test_anonymous_module.cpp 
dd291cff3b5d47337e371cd2c1082fd6716af3fc 
  src/slave/main.cpp 9d48a0823189ea6505073a2803f02d90dc382ab4 
  src/tests/anonymous_tests.cpp bc29ff8be94af82dd97f43db4f9594036705e835 
  src/tests/module.hpp 8e92774ddd51bc8a1368fb1cf6546300696b2d22 
  src/tests/module.cpp 7968519996ca9f9d8895e73d5f173d26a7e794e0 

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


Testing
-------

Unit tests pass.

Also implemented in the 
[execute-module](http://github.com/massenz/execute-module) - and it works there 
too:
```
I1228 17:40:37.769500 26127 main.cpp:273] Initializing anonymous module 
'com_alertavert_mesos_RemoteExecution'
I1228 17:40:37.769516 26127 main.cpp:279] Sending flags to module 
'com_alertavert_mesos_RemoteExecution'
I1228 17:40:37.769532 26127 execute_module.cpp:259] >>>>> init()
I1228 17:40:37.769552 26127 execute_module.cpp:262] advertise_ip: None
I1228 17:40:37.769567 26127 execute_module.cpp:262] advertise_port: None
I1228 17:40:37.769585 26127 execute_module.cpp:262] appc_store_dir: 
/tmp/mesos/store/appc
I1228 17:40:37.769603 26127 execute_module.cpp:262] attributes: None
I1228 17:40:37.769632 26127 execute_module.cpp:262] authenticatee: crammd5
...
I1228 17:40:37.771070 26127 execute_module.cpp:262] version: false
I1228 17:40:37.771086 26127 execute_module.cpp:262] work_dir: /tmp/agent
I1228 17:40:37.771389 26127 main.cpp:307] Starting Mesos slave
...
```


Thanks,

Marco Massenzio

Reply via email to