You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Bryan Fok <br...@rkrepsilon.com> on 2016/07/05 06:11:05 UTC

Mesos API - How to send argument to task?

<http://stackoverflow.com/questions/38195194/mesos-api-how-to-send-argument-to-task#>
Hi all

I am writing a python framework which has a custom executor. Each task I
submit will need to pass 2 string as arguments, each task also need 2
unique xml configuration files in the slave for the custom executor. So how
do I pass arguments around for each task, as well as files as arguments?

Re: Mesos API - How to send argument to task?

Posted by Bryan Fok <br...@rkrepsilon.com>.
I end up using a shared folder, so both parties are using the same path to
referencing resources

On Tue, Jul 5, 2016 at 2:48 PM, Bryan Fok <br...@rkrepsilon.com> wrote:

> Thanks bro, thanks for your advance. I will try it out and return feedback
> here
>
> On Tue, Jul 5, 2016 at 2:23 PM, Gilbert Song <gi...@mesosphere.io>
> wrote:
>
>> Bryan,
>>
>> You can define your own arguments in your
>> 'TaskInfo::CommandInfo::arguments',
>> while having your executable as 'value'. Please note that 'shell'
>> defaults to be true
>> in CommandInfo.
>>
>> Gilbert
>>
>> On Mon, Jul 4, 2016 at 11:11 PM, Bryan Fok <br...@rkrepsilon.com>
>> wrote:
>>
>>>
>>>
>>>
>>>
>>>
>>> <http://stackoverflow.com/questions/38195194/mesos-api-how-to-send-argument-to-task#>
>>> Hi all
>>>
>>> I am writing a python framework which has a custom executor. Each task I
>>> submit will need to pass 2 string as arguments, each task also need 2
>>> unique xml configuration files in the slave for the custom executor. So how
>>> do I pass arguments around for each task, as well as files as arguments?
>>>
>>>
>>>
>>>
>>>
>>>
>>
>

Re: Mesos API - How to send argument to task?

Posted by Bryan Fok <br...@rkrepsilon.com>.
Thanks bro, thanks for your advance. I will try it out and return feedback
here

On Tue, Jul 5, 2016 at 2:23 PM, Gilbert Song <gi...@mesosphere.io> wrote:

> Bryan,
>
> You can define your own arguments in your
> 'TaskInfo::CommandInfo::arguments',
> while having your executable as 'value'. Please note that 'shell' defaults
> to be true
> in CommandInfo.
>
> Gilbert
>
> On Mon, Jul 4, 2016 at 11:11 PM, Bryan Fok <br...@rkrepsilon.com>
> wrote:
>
>>
>>
>>
>>
>>
>> <http://stackoverflow.com/questions/38195194/mesos-api-how-to-send-argument-to-task#>
>> Hi all
>>
>> I am writing a python framework which has a custom executor. Each task I
>> submit will need to pass 2 string as arguments, each task also need 2
>> unique xml configuration files in the slave for the custom executor. So how
>> do I pass arguments around for each task, as well as files as arguments?
>>
>>
>>
>>
>>
>>
>

Re: Mesos API - How to send argument to task?

Posted by Gilbert Song <gi...@mesosphere.io>.
Bryan,

You can define your own arguments in your
'TaskInfo::CommandInfo::arguments',
while having your executable as 'value'. Please note that 'shell' defaults
to be true
in CommandInfo.

Gilbert

On Mon, Jul 4, 2016 at 11:11 PM, Bryan Fok <br...@rkrepsilon.com> wrote:

>
>
>
>
>
> <http://stackoverflow.com/questions/38195194/mesos-api-how-to-send-argument-to-task#>
> Hi all
>
> I am writing a python framework which has a custom executor. Each task I
> submit will need to pass 2 string as arguments, each task also need 2
> unique xml configuration files in the slave for the custom executor. So how
> do I pass arguments around for each task, as well as files as arguments?
>
>
>
>
>
>

Re: Mesos API - How to send argument to task?

Posted by Shuai Lin <li...@gmail.com>.
For the xml files part, I think you can set uris in CommandInfo with
file:// scheme, e.g. file:///etc/path/to/foo.xml. Then in your executor you
can access the files in /mnt/mesos/sandbox/foo.xml.

On Tue, Jul 5, 2016 at 2:11 PM, Bryan Fok <br...@rkrepsilon.com> wrote:

>
>
>
>
>
> <http://stackoverflow.com/questions/38195194/mesos-api-how-to-send-argument-to-task#>
> Hi all
>
> I am writing a python framework which has a custom executor. Each task I
> submit will need to pass 2 string as arguments, each task also need 2
> unique xml configuration files in the slave for the custom executor. So how
> do I pass arguments around for each task, as well as files as arguments?
>
>
>
>
>
>