[ 
https://issues.apache.org/jira/browse/MESOS-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15120919#comment-15120919
 ] 

Marco Massenzio commented on MESOS-4253:
----------------------------------------

Hey [~karya] - with {{0.27}} (almost) out of the way, do you think you will 
have time to review and discuss this patch?

I have some spare time this weekend (unfortunately, now Mesos is no longer my 
day job :) ) so I could address any comments you may have, as well as maybe 
also add the code for the "finalization" (if we do agree that it's desirable to 
have it).

I'm really keen to have this, as it will allow me to continue some work on a 
monitoring application for Mesos.

https://reviews.apache.org/r/41760/
https://reviews.apache.org/r/41854/

Thanks!

> Provide a minimalist "runtime context" to an Anonymous Module
> -------------------------------------------------------------
>
>                 Key: MESOS-4253
>                 URL: https://issues.apache.org/jira/browse/MESOS-4253
>             Project: Mesos
>          Issue Type: Improvement
>          Components: modules
>            Reporter: Marco Massenzio
>            Assignee: Marco Massenzio
>
> Currently, {{Anonymous}} modules only receive at creation a copy of the 
> {{"parameters"}} passed in the JSON configuration file.
> However, at runtime, it would be useful to also have a "runtime context" for 
> the module developer to use, when implementing the functionality.
> I would suggest to pass in the {{Flags}} object from the Master/Agent inside 
> an {{setRuntimeContext(const Flags&)}}[0] method, called immediately 
> post-{{create(const Parameters&)}}[1].
> Also, I would suggest adding a {{teardown()}} method too, in case the module 
> needs to release resources / conduct cleanup before exiting (there is a TODO 
> in the code to this effect, and adding this in this patch would be close to 
> trivial).
> [0] In practice, it won't be this trivial, as Master/Agent {{Flags}} are of a 
> different compile-time type - probably use something like variadic templates 
> or something (suggestions appreciated!).
> [1] In fact, the ideal solution would be to add the {{const Flags&}} to 
> {{create()}}, but that would, alas, break everyone's modules; so that's 
> probably a no-go (ideas welcome here too).



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

Reply via email to