You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by HUO Jing <hu...@ihep.ac.cn> on 2014/01/06 06:41:06 UTC

Question about Executor

Hi,
I am trying to develop a framework scheduler and executor to add Torque to Mesos.
Now, I have a problem. As I know, Mesos uses linux container to isolate resources, so pbs_mom has to be started in executor. But when there is no task running in the executor, mesos slave will shut down the executor, then the pbs_mom will be shutted down too. If pbs_mom is not running, pbs_server cannot assign job to it.
So, I want to know , is there a way to keep the executor running all the time? And, is there a way to start executor even there is no task for it to run ? 

Thank you very much!
Best Wishes!

Huojing 

Re: Re: Re: Question about Executor

Posted by HUO Jing <hu...@ihep.ac.cn>.
I have read the Torque implementation's code already, that is not suitable for us.
It has to schedul one node at a time, not one core.
Now I am trying to implement it by using Maui as the job scheduler, and make Maui request resources from Mesos.
The requesting resource part is done, and the part that update the Torque job state to mesos is done too.
The rest work I have to do is making the executors on every salve be started before Maui begin to schedule jobs.

I will try to start a simple task on every slave whose only goal is to start the executor.

Thank you all for the advices! 

> -----原始邮件-----
> 发件人: "Vinod Kone" <vi...@gmail.com>
> 发送时间: 2014年1月7日 星期二
> 收件人: dev <de...@mesos.apache.org>
> 抄送: 
> 主题: Re: Re: Question about Executor
> 
> Technically you can't launch an executor without a task. There is no
> launchExecutor() scheduler driver method only launchTask() which launches
> an executor if one isn't already running on the slave. That said I could
> imagine launching a dummy/startup task whose only goal is to get an
> executor launched. The subsequent tasks launched on the executor could be
> real tasks. This would likely require some bookkeeping by the scheduler.
> Makes sense?
> 
> Also, as Julien mentioned take a look at the existing Torque
> implementation. That code hasn't been touched in a while (last commit was 3
> years ago) so it's likely not going to work out of the box. But it could be
> a good starting point.
> 
> On Mon, Jan 6, 2014 at 6:50 AM, Julien Eid <je...@gmail.com> wrote:
> 
> > Hey,
> >
> > Are you trying to put Torque on Mesos? Because someone has already ported
> > Torque on Mesos and you might want to just take what they've worked on and
> > improve it.
> >
> > https://github.com/apache/mesos/tree/master/frameworks/torque
> >
> > Enjoy!
> > Julien
> >
> >
> > On Mon, Jan 6, 2014 at 4:13 AM, HUO Jing <hu...@ihep.ac.cn> wrote:
> >
> > > Thank you very much!
> > > Another question:
> > > Can I start the Executor even if there is no task to run on it?
> > > And how to do it ?
> > > > -----原始邮件-----
> > > > 发件人: "Vinod Kone" <vi...@gmail.com>
> > > > 发送时间: 2014年1月6日 星期一
> > > > 收件人: dev <de...@mesos.apache.org>
> > > > 抄送:
> > > > 主题: Re: Question about Executor
> > > >
> > > > On Sun, Jan 5, 2014 at 9:41 PM, HUO Jing <hu...@ihep.ac.cn> wrote:
> > > >
> > > > > But when there is no task running in the executor, mesos slave will
> > > shut
> > > > > down the executor
> > > >
> > > >
> > > > This is not true. The mesos slave will not kill an executor when it has
> > > no
> > > > tasks running. It is up to the executor whether it wants to keep
> > running
> > > > when there are no tasks or shut down.
> > > >
> > > > Hope that helps,
> > >
> > >
> >


Re: Re: Question about Executor

Posted by Vinod Kone <vi...@gmail.com>.
Technically you can't launch an executor without a task. There is no
launchExecutor() scheduler driver method only launchTask() which launches
an executor if one isn't already running on the slave. That said I could
imagine launching a dummy/startup task whose only goal is to get an
executor launched. The subsequent tasks launched on the executor could be
real tasks. This would likely require some bookkeeping by the scheduler.
Makes sense?

Also, as Julien mentioned take a look at the existing Torque
implementation. That code hasn't been touched in a while (last commit was 3
years ago) so it's likely not going to work out of the box. But it could be
a good starting point.

On Mon, Jan 6, 2014 at 6:50 AM, Julien Eid <je...@gmail.com> wrote:

> Hey,
>
> Are you trying to put Torque on Mesos? Because someone has already ported
> Torque on Mesos and you might want to just take what they've worked on and
> improve it.
>
> https://github.com/apache/mesos/tree/master/frameworks/torque
>
> Enjoy!
> Julien
>
>
> On Mon, Jan 6, 2014 at 4:13 AM, HUO Jing <hu...@ihep.ac.cn> wrote:
>
> > Thank you very much!
> > Another question:
> > Can I start the Executor even if there is no task to run on it?
> > And how to do it ?
> > > -----原始邮件-----
> > > 发件人: "Vinod Kone" <vi...@gmail.com>
> > > 发送时间: 2014年1月6日 星期一
> > > 收件人: dev <de...@mesos.apache.org>
> > > 抄送:
> > > 主题: Re: Question about Executor
> > >
> > > On Sun, Jan 5, 2014 at 9:41 PM, HUO Jing <hu...@ihep.ac.cn> wrote:
> > >
> > > > But when there is no task running in the executor, mesos slave will
> > shut
> > > > down the executor
> > >
> > >
> > > This is not true. The mesos slave will not kill an executor when it has
> > no
> > > tasks running. It is up to the executor whether it wants to keep
> running
> > > when there are no tasks or shut down.
> > >
> > > Hope that helps,
> >
> >
>

Re: Re: Question about Executor

Posted by Dave Lester <da...@ischool.berkeley.edu>.
Hi Matt,

The best way to go about this would be to checkout the Mesos repository on
git, and submit a patch to review board: https://reviews.apache.org You'll
find the current list in the docs/powered-by-mesos.md file, however it may
be the right time to break frameworks into a separate markdown file of
their own.

Let me know if you have any questions along the way! It may be worth
creating a JIRA ticket to track this as well:
issues.apache.org/jira/browse/MESOS

Best,
Dave


On Tue, Jan 7, 2014 at 5:49 AM, Matt Trifiro <ma...@trifiro.com> wrote:

> Vinod,
>
> I volunteer to create (and help maintain) a canonical list of Mesos
> frameworks and resources. I will probably build it in a Google doc but we
> can migrate some/all of it into the Mesos github page when it becomes
> substantial enough.
>
> matt
>
>
> Matthew G Trifiro
> matt@trifiro.com
> +1 206 390 3161
> twitter.com/mtrifiro
> linkedin.com/in/mtrifiro
>
>
> On Mon, Jan 6, 2014 at 10:32 AM, Vinod Kone <vi...@gmail.com> wrote:
>
> > On Mon, Jan 6, 2014 at 8:21 AM, Matt Trifiro <ma...@trifiro.com> wrote:
> >
> > > Relatedly... Is there a canonical listing of Mesos frameworks currently
> > > implemented?
> > >
> > >
> >
> https://github.com/apache/mesos/blob/master/docs/powered-by-mesos.mdshould
> > be the authoritative list but it is woefully out of date :(
> >
> >
> >
> > > matt
> > >
> > >
> > > On Mon, Jan 6, 2014 at 6:50 AM, Julien Eid <je...@gmail.com> wrote:
> > >
> > > > Hey,
> > > >
> > > > Are you trying to put Torque on Mesos? Because someone has already
> > ported
> > > > Torque on Mesos and you might want to just take what they've worked
> on
> > > and
> > > > improve it.
> > > >
> > > > https://github.com/apache/mesos/tree/master/frameworks/torque
> > > >
> > > > Enjoy!
> > > > Julien
> > > >
> > > >
> > > > On Mon, Jan 6, 2014 at 4:13 AM, HUO Jing <hu...@ihep.ac.cn> wrote:
> > > >
> > > > > Thank you very much!
> > > > > Another question:
> > > > > Can I start the Executor even if there is no task to run on it?
> > > > > And how to do it ?
> > > > > > -----原始邮件-----
> > > > > > 发件人: "Vinod Kone" <vi...@gmail.com>
> > > > > > 发送时间: 2014年1月6日 星期一
> > > > > > 收件人: dev <de...@mesos.apache.org>
> > > > > > 抄送:
> > > > > > 主题: Re: Question about Executor
> > > > > >
> > > > > > On Sun, Jan 5, 2014 at 9:41 PM, HUO Jing <hu...@ihep.ac.cn>
> > wrote:
> > > > > >
> > > > > > > But when there is no task running in the executor, mesos slave
> > will
> > > > > shut
> > > > > > > down the executor
> > > > > >
> > > > > >
> > > > > > This is not true. The mesos slave will not kill an executor when
> it
> > > has
> > > > > no
> > > > > > tasks running. It is up to the executor whether it wants to keep
> > > > running
> > > > > > when there are no tasks or shut down.
> > > > > >
> > > > > > Hope that helps,
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: Question about Executor

Posted by Vinod Kone <vi...@twitter.com>.
Awesome!

@vinodkone
Sent from my mobile 

> On Jan 7, 2014, at 5:49 AM, Matt Trifiro <ma...@trifiro.com> wrote:
> 
> Vinod,
> 
> I volunteer to create (and help maintain) a canonical list of Mesos
> frameworks and resources. I will probably build it in a Google doc but we
> can migrate some/all of it into the Mesos github page when it becomes
> substantial enough.
> 
> matt
> 
> 
> Matthew G Trifiro
> matt@trifiro.com
> +1 206 390 3161
> twitter.com/mtrifiro
> linkedin.com/in/mtrifiro
> 
> 
>> On Mon, Jan 6, 2014 at 10:32 AM, Vinod Kone <vi...@gmail.com> wrote:
>> 
>>> On Mon, Jan 6, 2014 at 8:21 AM, Matt Trifiro <ma...@trifiro.com> wrote:
>>> 
>>> Relatedly... Is there a canonical listing of Mesos frameworks currently
>>> implemented?
>> https://github.com/apache/mesos/blob/master/docs/powered-by-mesos.mdshould
>> be the authoritative list but it is woefully out of date :(
>> 
>> 
>> 
>>> matt
>>> 
>>> 
>>>> On Mon, Jan 6, 2014 at 6:50 AM, Julien Eid <je...@gmail.com> wrote:
>>>> 
>>>> Hey,
>>>> 
>>>> Are you trying to put Torque on Mesos? Because someone has already
>> ported
>>>> Torque on Mesos and you might want to just take what they've worked on
>>> and
>>>> improve it.
>>>> 
>>>> https://github.com/apache/mesos/tree/master/frameworks/torque
>>>> 
>>>> Enjoy!
>>>> Julien
>>>> 
>>>> 
>>>>> On Mon, Jan 6, 2014 at 4:13 AM, HUO Jing <hu...@ihep.ac.cn> wrote:
>>>>> 
>>>>> Thank you very much!
>>>>> Another question:
>>>>> Can I start the Executor even if there is no task to run on it?
>>>>> And how to do it ?
>>>>>> -----原始邮件-----
>>>>>> 发件人: "Vinod Kone" <vi...@gmail.com>
>>>>>> 发送时间: 2014年1月6日 星期一
>>>>>> 收件人: dev <de...@mesos.apache.org>
>>>>>> 抄送:
>>>>>> 主题: Re: Question about Executor
>>>>>> 
>>>>>> On Sun, Jan 5, 2014 at 9:41 PM, HUO Jing <hu...@ihep.ac.cn>
>> wrote:
>>>>>> 
>>>>>>> But when there is no task running in the executor, mesos slave
>> will
>>>>> shut
>>>>>>> down the executor
>>>>>> 
>>>>>> 
>>>>>> This is not true. The mesos slave will not kill an executor when it
>>> has
>>>>> no
>>>>>> tasks running. It is up to the executor whether it wants to keep
>>>> running
>>>>>> when there are no tasks or shut down.
>>>>>> 
>>>>>> Hope that helps,
>> 

Re: Re: Question about Executor

Posted by Matt Trifiro <ma...@trifiro.com>.
Vinod,

I volunteer to create (and help maintain) a canonical list of Mesos
frameworks and resources. I will probably build it in a Google doc but we
can migrate some/all of it into the Mesos github page when it becomes
substantial enough.

matt


Matthew G Trifiro
matt@trifiro.com
+1 206 390 3161
twitter.com/mtrifiro
linkedin.com/in/mtrifiro


On Mon, Jan 6, 2014 at 10:32 AM, Vinod Kone <vi...@gmail.com> wrote:

> On Mon, Jan 6, 2014 at 8:21 AM, Matt Trifiro <ma...@trifiro.com> wrote:
>
> > Relatedly... Is there a canonical listing of Mesos frameworks currently
> > implemented?
> >
> >
> https://github.com/apache/mesos/blob/master/docs/powered-by-mesos.mdshould
> be the authoritative list but it is woefully out of date :(
>
>
>
> > matt
> >
> >
> > On Mon, Jan 6, 2014 at 6:50 AM, Julien Eid <je...@gmail.com> wrote:
> >
> > > Hey,
> > >
> > > Are you trying to put Torque on Mesos? Because someone has already
> ported
> > > Torque on Mesos and you might want to just take what they've worked on
> > and
> > > improve it.
> > >
> > > https://github.com/apache/mesos/tree/master/frameworks/torque
> > >
> > > Enjoy!
> > > Julien
> > >
> > >
> > > On Mon, Jan 6, 2014 at 4:13 AM, HUO Jing <hu...@ihep.ac.cn> wrote:
> > >
> > > > Thank you very much!
> > > > Another question:
> > > > Can I start the Executor even if there is no task to run on it?
> > > > And how to do it ?
> > > > > -----原始邮件-----
> > > > > 发件人: "Vinod Kone" <vi...@gmail.com>
> > > > > 发送时间: 2014年1月6日 星期一
> > > > > 收件人: dev <de...@mesos.apache.org>
> > > > > 抄送:
> > > > > 主题: Re: Question about Executor
> > > > >
> > > > > On Sun, Jan 5, 2014 at 9:41 PM, HUO Jing <hu...@ihep.ac.cn>
> wrote:
> > > > >
> > > > > > But when there is no task running in the executor, mesos slave
> will
> > > > shut
> > > > > > down the executor
> > > > >
> > > > >
> > > > > This is not true. The mesos slave will not kill an executor when it
> > has
> > > > no
> > > > > tasks running. It is up to the executor whether it wants to keep
> > > running
> > > > > when there are no tasks or shut down.
> > > > >
> > > > > Hope that helps,
> > > >
> > > >
> > >
> >
>

Re: Re: Question about Executor

Posted by Vinod Kone <vi...@gmail.com>.
On Mon, Jan 6, 2014 at 8:21 AM, Matt Trifiro <ma...@trifiro.com> wrote:

> Relatedly... Is there a canonical listing of Mesos frameworks currently
> implemented?
>
>
https://github.com/apache/mesos/blob/master/docs/powered-by-mesos.md should
be the authoritative list but it is woefully out of date :(



> matt
>
>
> On Mon, Jan 6, 2014 at 6:50 AM, Julien Eid <je...@gmail.com> wrote:
>
> > Hey,
> >
> > Are you trying to put Torque on Mesos? Because someone has already ported
> > Torque on Mesos and you might want to just take what they've worked on
> and
> > improve it.
> >
> > https://github.com/apache/mesos/tree/master/frameworks/torque
> >
> > Enjoy!
> > Julien
> >
> >
> > On Mon, Jan 6, 2014 at 4:13 AM, HUO Jing <hu...@ihep.ac.cn> wrote:
> >
> > > Thank you very much!
> > > Another question:
> > > Can I start the Executor even if there is no task to run on it?
> > > And how to do it ?
> > > > -----原始邮件-----
> > > > 发件人: "Vinod Kone" <vi...@gmail.com>
> > > > 发送时间: 2014年1月6日 星期一
> > > > 收件人: dev <de...@mesos.apache.org>
> > > > 抄送:
> > > > 主题: Re: Question about Executor
> > > >
> > > > On Sun, Jan 5, 2014 at 9:41 PM, HUO Jing <hu...@ihep.ac.cn> wrote:
> > > >
> > > > > But when there is no task running in the executor, mesos slave will
> > > shut
> > > > > down the executor
> > > >
> > > >
> > > > This is not true. The mesos slave will not kill an executor when it
> has
> > > no
> > > > tasks running. It is up to the executor whether it wants to keep
> > running
> > > > when there are no tasks or shut down.
> > > >
> > > > Hope that helps,
> > >
> > >
> >
>

Re: Re: Question about Executor

Posted by Matt Trifiro <ma...@trifiro.com>.
Relatedly... Is there a canonical listing of Mesos frameworks currently
implemented?

matt


On Mon, Jan 6, 2014 at 6:50 AM, Julien Eid <je...@gmail.com> wrote:

> Hey,
>
> Are you trying to put Torque on Mesos? Because someone has already ported
> Torque on Mesos and you might want to just take what they've worked on and
> improve it.
>
> https://github.com/apache/mesos/tree/master/frameworks/torque
>
> Enjoy!
> Julien
>
>
> On Mon, Jan 6, 2014 at 4:13 AM, HUO Jing <hu...@ihep.ac.cn> wrote:
>
> > Thank you very much!
> > Another question:
> > Can I start the Executor even if there is no task to run on it?
> > And how to do it ?
> > > -----原始邮件-----
> > > 发件人: "Vinod Kone" <vi...@gmail.com>
> > > 发送时间: 2014年1月6日 星期一
> > > 收件人: dev <de...@mesos.apache.org>
> > > 抄送:
> > > 主题: Re: Question about Executor
> > >
> > > On Sun, Jan 5, 2014 at 9:41 PM, HUO Jing <hu...@ihep.ac.cn> wrote:
> > >
> > > > But when there is no task running in the executor, mesos slave will
> > shut
> > > > down the executor
> > >
> > >
> > > This is not true. The mesos slave will not kill an executor when it has
> > no
> > > tasks running. It is up to the executor whether it wants to keep
> running
> > > when there are no tasks or shut down.
> > >
> > > Hope that helps,
> >
> >
>

Re: Re: Question about Executor

Posted by Julien Eid <je...@gmail.com>.
Hey,

Are you trying to put Torque on Mesos? Because someone has already ported
Torque on Mesos and you might want to just take what they've worked on and
improve it.

https://github.com/apache/mesos/tree/master/frameworks/torque

Enjoy!
Julien


On Mon, Jan 6, 2014 at 4:13 AM, HUO Jing <hu...@ihep.ac.cn> wrote:

> Thank you very much!
> Another question:
> Can I start the Executor even if there is no task to run on it?
> And how to do it ?
> > -----原始邮件-----
> > 发件人: "Vinod Kone" <vi...@gmail.com>
> > 发送时间: 2014年1月6日 星期一
> > 收件人: dev <de...@mesos.apache.org>
> > 抄送:
> > 主题: Re: Question about Executor
> >
> > On Sun, Jan 5, 2014 at 9:41 PM, HUO Jing <hu...@ihep.ac.cn> wrote:
> >
> > > But when there is no task running in the executor, mesos slave will
> shut
> > > down the executor
> >
> >
> > This is not true. The mesos slave will not kill an executor when it has
> no
> > tasks running. It is up to the executor whether it wants to keep running
> > when there are no tasks or shut down.
> >
> > Hope that helps,
>
>

Re: Re: Question about Executor

Posted by HUO Jing <hu...@ihep.ac.cn>.
Thank you very much!
Another question:
Can I start the Executor even if there is no task to run on it?
And how to do it ?
> -----原始邮件-----
> 发件人: "Vinod Kone" <vi...@gmail.com>
> 发送时间: 2014年1月6日 星期一
> 收件人: dev <de...@mesos.apache.org>
> 抄送: 
> 主题: Re: Question about Executor
> 
> On Sun, Jan 5, 2014 at 9:41 PM, HUO Jing <hu...@ihep.ac.cn> wrote:
> 
> > But when there is no task running in the executor, mesos slave will shut
> > down the executor
> 
> 
> This is not true. The mesos slave will not kill an executor when it has no
> tasks running. It is up to the executor whether it wants to keep running
> when there are no tasks or shut down.
> 
> Hope that helps,


Re: Question about Executor

Posted by Vinod Kone <vi...@gmail.com>.
On Sun, Jan 5, 2014 at 9:41 PM, HUO Jing <hu...@ihep.ac.cn> wrote:

> But when there is no task running in the executor, mesos slave will shut
> down the executor


This is not true. The mesos slave will not kill an executor when it has no
tasks running. It is up to the executor whether it wants to keep running
when there are no tasks or shut down.

Hope that helps,