> On Nov. 18, 2013, 6:13 p.m., Ben Mahler wrote:
> > include/mesos/mesos.proto, lines 126-134
> > <https://reviews.apache.org/r/15542/diff/3/?file=387242#file387242line126>
> >
> >     Thanks for clarifying!
> >     
> >     Rather than offer two ways of doing it, let's mark the old one as 
> > deprecated so that we can eventually have frameworks only using this 
> > improved version. Or is there a reason to keep both versions indefinitely?
> >     
> >     How about we clean up the naming a little bit? ExecV seems to suggest 
> > too much about the implementation, what about s/ExecV/Command/ and 
> > s/args/arguments/ (we tend to avoid abbreviations):
> >     
> >     message Command {
> >       required string command = 1;
> >       repeated string arguments = 2;
> >     }
> >     
> >     ...
> >     required string value = 3; // Deprecated, please use command instead.
> >     optional Command command = 4;
> 
> Jason Dusek wrote:
>     I would be happy to change the names as you suggest.
>     
>     Deprecating `value` makes a lot of sense, I will add the comment.
>     
>     In the future -- maybe in a future update for this review? -- we could 
> add an optional `bytes body` to the Command structure, which would allow 
> users to pass a script -- shell or Python or Lua or PL/SQL -- which the slave 
> could place in a temporary location and mark executable. This would be a good 
> option for frameworks and tools that presently rely on shell control flow and 
> glob expansion. (As does the Hadoop framework, for example.) The name of the 
> file on disk where the `body` is placed would be randomly generated; the 
> `command`, if present, could serve as the name of the command as it would 
> show up in `ps`. (Rewriting $0 is something Postfix, Postgres and many other 
> tools do to make it easier to interpret a process listing.) What do you think 
> of that idea?
> 
> Vinod Kone wrote:
>     If we deprecate "value", how would it work for people that do want shell 
> expansion? Is it Command.command = "sh -c foo" ?

Here is a way to get shell expansion with the Command message:

  Command.command = "/bin/sh"
  Command.arguments = ["-c", "shell command with $vars and gl*bs"]


- Jason


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


On Nov. 18, 2013, 1:31 a.m., Jason Dusek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15542/
> -----------------------------------------------------------
> 
> (Updated Nov. 18, 2013, 1:31 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Niklas Nielsen.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Offer an execvp like interface for running tasks.
> 
> Review: https://reviews.apache.org/r/15542
> 
> 
> Diffs
> -----
> 
>   include/mesos/mesos.proto 655f86757487ddbe551fdcf53eb793e773ecdd34 
>   src/examples/python/test_framework.py 
> deca48e779ae099424fa73bb9a8ac5c419c5faf1 
>   src/launcher/executor.cpp b73ab479500a7347a38ba53acecfab9229f1080d 
>   src/launcher/launcher.cpp d5ab66704429a95eeb8eda5188e33d8e691221af 
>   src/launcher/main.cpp de64609905ee63096c0173fe7e64a1eafea5d6bf 
>   src/slave/process_isolator.cpp a6e9ed6a654972e8a51a9a033052e02ce44fe3e4 
> 
> Diff: https://reviews.apache.org/r/15542/diff/
> 
> 
> Testing
> -------
> 
> Ran Python test executor and `make check`.
> 
> 
> Thanks,
> 
> Jason Dusek
> 
>

Reply via email to