You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Alex Kotelnikov <al...@diginetica.com> on 2017/11/22 14:26:39 UTC

Can't really understand how do Executors can be injected...

Hey,

I've read Scheduler HTTP API
http://mesos.apache.org/documentation/latest/scheduler-http-api/

and do not see how to (what is a call for):
1. Launch a task without accepting an offer (on already existing executor).
2. Initiate an executor with no tasks (to launch them later).
3. How actually to introduce your own executor with V1 protocol.

Could you please point me at line in the API, specification, code, whatever.

Thanks a lot,


-- 

Best Regards,


*Alexander Kotelnikov*

*Team Lead*

DIGINETICA
Retail Technology Company

m: +7.921.915.06.28

*www.diginetica.com <http://www.diginetica.com/>*

Re: Can't really understand how do Executors can be injected...

Posted by Tomek Janiszewski <ja...@gmail.com>.
Task contains information about resources for an executor [1] by default
its 0.1 CPU and 32 MEM [2]

1: https://github.com/apache/mesos/blob/1.4.1/include/mesos/mesos.proto#L736
2:
https://github.com/apache/mesos/blob/1.4.1/src/slave/constants.hpp#L101-L105

czw., 23 lis 2017 o 10:15 użytkownik Alex Kotelnikov <
alex.kotelnikov@diginetica.com> napisał:

> A-ha.
>
> This means that there is no resources reservation for an executor,
> resources are totally dedicated to tasks, correct?
>
>
> On 22 November 2017 at 22:20, Vinod Kone <vi...@apache.org> wrote:
>
>> If you have an executor running on a agent, wait for an offer from *that
>> agent* and launch a new task with the *same* ExecutorInfo as the one you
>> originally used to launch the executor. In this case, mesos will not launch
>> a new executor but passes the task to the already running executor. Note
>> that, if for some reason your original executor died just as you were
>> launching the new task, mesos will launch a new instance of that executor
>> and pass the new task. So your executor needs to handle this race.
>>
>> On Wed, Nov 22, 2017 at 10:45 AM, Alex Kotelnikov <
>> alex.kotelnikov@diginetica.com> wrote:
>>
>>> Vihod,
>>>
>>> much more clear. Thanks.
>>>
>>> I refined first question inline.
>>>
>>> On 22 November 2017 at 21:15, Vinod Kone <vi...@apache.org> wrote:
>>>
>>>> Hi Alex,
>>>>
>>>> See my answers below
>>>>
>>>> 1. Launch a task without accepting an offer (on already existing
>>>>> executor).
>>>>>
>>>>
>>>> This is not currently possible. Every task needs some non-zero
>>>> resources, and hence an offer, to be launched. What's your use case?
>>>>
>>>
>>> Basically if I have an executor running, how to launch a task on it?
>>>
>>>
>>> --
>>>
>>> Best Regards,
>>>
>>>
>>> *Alexander Kotelnikov*
>>>
>>> *Team Lead*
>>>
>>> DIGINETICA
>>> Retail Technology Company
>>>
>>> m: +7.921.915.06.28 <+7%20921%20915-06-28>
>>>
>>> *www.diginetica.com <http://www.diginetica.com/>*
>>>
>>
>>
>
>
> --
>
> Best Regards,
>
>
> *Alexander Kotelnikov*
>
> *Team Lead*
>
> DIGINETICA
> Retail Technology Company
>
> m: +7.921.915.06.28 <+7%20921%20915-06-28>
>
> *www.diginetica.com <http://www.diginetica.com/>*
>

Re: Can't really understand how do Executors can be injected...

Posted by Alex Kotelnikov <al...@diginetica.com>.
A-ha.

This means that there is no resources reservation for an executor,
resources are totally dedicated to tasks, correct?


On 22 November 2017 at 22:20, Vinod Kone <vi...@apache.org> wrote:

> If you have an executor running on a agent, wait for an offer from *that
> agent* and launch a new task with the *same* ExecutorInfo as the one you
> originally used to launch the executor. In this case, mesos will not launch
> a new executor but passes the task to the already running executor. Note
> that, if for some reason your original executor died just as you were
> launching the new task, mesos will launch a new instance of that executor
> and pass the new task. So your executor needs to handle this race.
>
> On Wed, Nov 22, 2017 at 10:45 AM, Alex Kotelnikov <
> alex.kotelnikov@diginetica.com> wrote:
>
>> Vihod,
>>
>> much more clear. Thanks.
>>
>> I refined first question inline.
>>
>> On 22 November 2017 at 21:15, Vinod Kone <vi...@apache.org> wrote:
>>
>>> Hi Alex,
>>>
>>> See my answers below
>>>
>>> 1. Launch a task without accepting an offer (on already existing
>>>> executor).
>>>>
>>>
>>> This is not currently possible. Every task needs some non-zero
>>> resources, and hence an offer, to be launched. What's your use case?
>>>
>>
>> Basically if I have an executor running, how to launch a task on it?
>>
>>
>> --
>>
>> Best Regards,
>>
>>
>> *Alexander Kotelnikov*
>>
>> *Team Lead*
>>
>> DIGINETICA
>> Retail Technology Company
>>
>> m: +7.921.915.06.28 <+7%20921%20915-06-28>
>>
>> *www.diginetica.com <http://www.diginetica.com/>*
>>
>
>


-- 

Best Regards,


*Alexander Kotelnikov*

*Team Lead*

DIGINETICA
Retail Technology Company

m: +7.921.915.06.28

*www.diginetica.com <http://www.diginetica.com/>*

Re: Can't really understand how do Executors can be injected...

Posted by Vinod Kone <vi...@apache.org>.
If you have an executor running on a agent, wait for an offer from *that
agent* and launch a new task with the *same* ExecutorInfo as the one you
originally used to launch the executor. In this case, mesos will not launch
a new executor but passes the task to the already running executor. Note
that, if for some reason your original executor died just as you were
launching the new task, mesos will launch a new instance of that executor
and pass the new task. So your executor needs to handle this race.

On Wed, Nov 22, 2017 at 10:45 AM, Alex Kotelnikov <
alex.kotelnikov@diginetica.com> wrote:

> Vihod,
>
> much more clear. Thanks.
>
> I refined first question inline.
>
> On 22 November 2017 at 21:15, Vinod Kone <vi...@apache.org> wrote:
>
>> Hi Alex,
>>
>> See my answers below
>>
>> 1. Launch a task without accepting an offer (on already existing
>>> executor).
>>>
>>
>> This is not currently possible. Every task needs some non-zero resources,
>> and hence an offer, to be launched. What's your use case?
>>
>
> Basically if I have an executor running, how to launch a task on it?
>
>
> --
>
> Best Regards,
>
>
> *Alexander Kotelnikov*
>
> *Team Lead*
>
> DIGINETICA
> Retail Technology Company
>
> m: +7.921.915.06.28 <+7%20921%20915-06-28>
>
> *www.diginetica.com <http://www.diginetica.com/>*
>

Re: Can't really understand how do Executors can be injected...

Posted by Alex Kotelnikov <al...@diginetica.com>.
Vihod,

much more clear. Thanks.

I refined first question inline.

On 22 November 2017 at 21:15, Vinod Kone <vi...@apache.org> wrote:

> Hi Alex,
>
> See my answers below
>
> 1. Launch a task without accepting an offer (on already existing executor).
>>
>
> This is not currently possible. Every task needs some non-zero resources,
> and hence an offer, to be launched. What's your use case?
>

Basically if I have an executor running, how to launch a task on it?


-- 

Best Regards,


*Alexander Kotelnikov*

*Team Lead*

DIGINETICA
Retail Technology Company

m: +7.921.915.06.28

*www.diginetica.com <http://www.diginetica.com/>*

Re: Can't really understand how do Executors can be injected...

Posted by Vinod Kone <vi...@apache.org>.
Hi Alex,

See my answers below

1. Launch a task without accepting an offer (on already existing executor).
>

This is not currently possible. Every task needs some non-zero resources,
and hence an offer, to be launched. What's your use case?


> 2. Initiate an executor with no tasks (to launch them later).
>

The only way to do it is to a launch an executor with dummy task. If you
are writing your own executor, you can interpret the dummy task as you wish
(e.g., no-op). There is no API to launch an executor without a task yet.


> 3. How actually to introduce your own executor with V1 protocol.
>

See the executor API doc
<http://mesos.apache.org/documentation/latest/scheduler-http-api/> on how
to write one. Once your executor binary exists, upload it in a storage
location somewhere (hdfs, http server etc) and pass it's location as URI in
ExecutorInfo. See example here
<https://github.com/apache/mesos/blob/master/src/examples/java/V1TestFramework.java>
.

HTH,


>
> Could you please point me at line in the API, specification, code,
> whatever.
>
> Thanks a lot,
>
>
> --
>
> Best Regards,
>
>
> *Alexander Kotelnikov*
>
> *Team Lead*
>
> DIGINETICA
> Retail Technology Company
>
> m: +7.921.915.06.28 <+7%20921%20915-06-28>
>
> *www.diginetica.com <http://www.diginetica.com/>*
>