[
https://issues.apache.org/jira/browse/MESOS-1896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14170008#comment-14170008
]
Kapil Arya edited comment on MESOS-1896 at 10/13/14 9:24 PM:
-------------------------------------------------------------
I like approach (a) better and would suggest the following enhancement:
{noformat}
json := { "libraries": [<library>, ...] }
library := { "file": "/path/to/libfoo.so", "modules": [<module>, ...] }
module := { "name": "module-name", "flags": [<flag>, ...] }
flag := { "name": "flag-name", "value": "flag-value" }
{noformat}
Example:
{noformatAny}
{
"libraries": [
{
"file": "/path/to/libfoo.so",
"modules": [
{
"name": "org_apache_mesos_bar",
"flags": [
{
"name": "host",
"value": "localhost"
}
{
"name": "port",
"value": "7799"
}
]
}
]
]
}
{noformat}
This one makes passing just the module names a bit harder. An alternate is the
following:
{noformat}
json := { "libraries": [<library>, ...] }
library := { "file": "/path/to/libfoo.so", "modules": ["module-name", ...],
"flags": [<flag>, ...] }
flag := { "module": "module-name", "flag": "flag-name", "value": "flag-value" }
{noformat}
Here we can omit flags if not needed.
[~nnielsen]/[~bernd-mesos]/[~benjaminhindman]: Any comments?
was (Author: karya):
I like approach (a) better and would suggest the following enhancement:
{noformat}
json := { "libraries": [<library>, ...] }
library := { "file": "/path/to/libfoo.so", "modules": [<module>, ...] }
module := { "name": "module-name", "flags": [<flag>, ...] }
flag := { "name": "flag-name", "value": "flag-value" }
{noformat}
Example:
{noformat}
{
"libraries": [
{
"file": "/path/to/libfoo.so",
"modules": [
{
"name": "org_apache_mesos_bar",
"flags": [
{
"name": "host",
"value": "localhost"
}
{
"name": "port",
"value": "7799"
}
]
}
]
]
}
{noformat}
This one makes passing just the module names a bit harder. An alternate is the
following:
{noformat}
json := { "libraries": [<library>, ...] }
library := { "file": "/path/to/libfoo.so", "modules": ["module-name", ...],
"flags": [<flag>, ...] }
flag := { "module": "module-name", "flag": "flag-name", "value": "flag-value" }
{noformat}
Here we can omit flags if not needed.
[~nnielsen][~bernd-mesos][~benjaminhindman]: Any comments?
> Enable module specific command line parameters
> -----------------------------------------------
>
> Key: MESOS-1896
> URL: https://issues.apache.org/jira/browse/MESOS-1896
> Project: Mesos
> Issue Type: Improvement
> Components: modules
> Reporter: Till Toenshoff
> Assignee: Kapil Arya
>
> h4. Idea
> Add a flags parameter to the create call and hand down textual or parsed JSON
> to the module. The JSON on the command line can either a) be associated with
> the module mention or it can b) be associated with the module kind's topic or
> c) have a separate flags section just for module flags.
> Opinions?
> h4. Examples (prototyping, not claiming this grammar is ideal):
> a) {noformat}slave --modules='[{lib : <path>, modules : [{name : "myModule",
> flags : '{credentials : "foo"}}]}]'{noformat}
> b) {noformat}slave --modules='[{lib : <path>, modules : [
> {"myModule"}]}]' --authenticatorFlags='{credentials : "foo"}'{noformat}
> c) {noformat}slave --modules='[{lib : <path>, modules : [{"myModule"}
> ]}]' --moduleFlags='[{module : "myModule", flags :
> {credentials : "foo"}
> ]}{noformat}
> In any case modules could report their required flags syntax when calling
> {noformat}slave --help --modules='[{lib : <path>, modules : [
> {"myModule"} ]}]'{noformat} or something like that in any of the above
> variants.
> This was copied from Bernd's comment on MESOS-1384.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)