You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dolphinscheduler.apache.org by whm_777 <wh...@163.com> on 2020/04/02 08:31:54 UTC

Api server, timing management interface depends on Quartz

hi, everyone !


Now, In the api server, on-line and off-line tasks depend on quartz scheduler.
QuartzExecutors.getInstance().addJob(ProcessScheduleJob.class, jobName, jobGroupName, startDate, endDate, schedule.getCrontab(), dataMap);
if(!QuartzExecutors.getInstance().deleteJob(jobName, jobGroupName)){ logger.warn("set offline failure:projectId:{},scheduleId:{}",projectId,scheduleId); throw new RuntimeException(String.format("set offline failure")); }
QuartzExecutors.getInstance():
SchedulerFactory schedulerFactory = new StdSchedulerFactory(Constants.QUARTZ_PROPERTIES_PATH); scheduler = schedulerFactory.getScheduler();
org.quartz.threadPool.threadCount = 25
25 worker threads are initialized by default.
These threads will never be used.


I didn't think about how to solve it, welcome to discuss.

Re: Api server, timing management interface depends on Quartz

Posted by lidong dai <da...@gmail.com>.
sorry for wrong issue id, this issue id, this is right issue  url:
https://github.com/apache/incubator-dolphinscheduler/issues/2351



Best Regards
---------------
DolphinScheduler(Incubator) PPMC
Lidong Dai 代立冬
dailidong66@gmail.com
---------------


lidong dai <da...@gmail.com> 于2020年4月3日周五 上午12:19写道:

> this issue:
> https://github.com/apache/incubator-dolphinscheduler/issues/2356 forward
> to mail list, haha
>
>
> Best Regards
> ---------------
> DolphinScheduler(Incubator) PPMC
> Lidong Dai 代立冬
> dailidong66@gmail.com
> ---------------
>
>
> whm_777 <wh...@163.com> 于2020年4月2日周四 下午4:32写道:
>
>> hi, everyone !
>>
>>
>> Now, In the api server, on-line and off-line tasks depend on quartz
>> scheduler.
>> QuartzExecutors.getInstance().addJob(ProcessScheduleJob.class, jobName,
>> jobGroupName, startDate, endDate, schedule.getCrontab(), dataMap);
>> if(!QuartzExecutors.getInstance().deleteJob(jobName, jobGroupName)){
>> logger.warn("set offline
>> failure:projectId:{},scheduleId:{}",projectId,scheduleId); throw new
>> RuntimeException(String.format("set offline failure")); }
>> QuartzExecutors.getInstance():
>> SchedulerFactory schedulerFactory = new
>> StdSchedulerFactory(Constants.QUARTZ_PROPERTIES_PATH); scheduler =
>> schedulerFactory.getScheduler();
>> org.quartz.threadPool.threadCount = 25
>> 25 worker threads are initialized by default.
>> These threads will never be used.
>>
>>
>> I didn't think about how to solve it, welcome to discuss.
>
>

Re: Api server, timing management interface depends on Quartz

Posted by guo jiwei <te...@gmail.com>.
This is a default value, for we want to use in server module only. But as
development goes, and api module uses the same config as server. so causes
the issue.
We will refactor quartz in the future. but in current version, you can set
it as below in api module。
org.quartz.threadPool.threadCount = 1

On Fri, Apr 3, 2020 at 12:20 AM lidong dai <da...@gmail.com> wrote:

> this issue:
> https://github.com/apache/incubator-dolphinscheduler/issues/2356
> forward
> to mail list, haha
>
>
> Best Regards
> ---------------
> DolphinScheduler(Incubator) PPMC
> Lidong Dai 代立冬
> dailidong66@gmail.com
> ---------------
>
>
> whm_777 <wh...@163.com> 于2020年4月2日周四 下午4:32写道:
>
> > hi, everyone !
> >
> >
> > Now, In the api server, on-line and off-line tasks depend on quartz
> > scheduler.
> > QuartzExecutors.getInstance().addJob(ProcessScheduleJob.class, jobName,
> > jobGroupName, startDate, endDate, schedule.getCrontab(), dataMap);
> > if(!QuartzExecutors.getInstance().deleteJob(jobName, jobGroupName)){
> > logger.warn("set offline
> > failure:projectId:{},scheduleId:{}",projectId,scheduleId); throw new
> > RuntimeException(String.format("set offline failure")); }
> > QuartzExecutors.getInstance():
> > SchedulerFactory schedulerFactory = new
> > StdSchedulerFactory(Constants.QUARTZ_PROPERTIES_PATH); scheduler =
> > schedulerFactory.getScheduler();
> > org.quartz.threadPool.threadCount = 25
> > 25 worker threads are initialized by default.
> > These threads will never be used.
> >
> >
> > I didn't think about how to solve it, welcome to discuss.
>

Re: Api server, timing management interface depends on Quartz

Posted by lidong dai <da...@gmail.com>.
this issue: https://github.com/apache/incubator-dolphinscheduler/issues/2356
forward
to mail list, haha


Best Regards
---------------
DolphinScheduler(Incubator) PPMC
Lidong Dai 代立冬
dailidong66@gmail.com
---------------


whm_777 <wh...@163.com> 于2020年4月2日周四 下午4:32写道:

> hi, everyone !
>
>
> Now, In the api server, on-line and off-line tasks depend on quartz
> scheduler.
> QuartzExecutors.getInstance().addJob(ProcessScheduleJob.class, jobName,
> jobGroupName, startDate, endDate, schedule.getCrontab(), dataMap);
> if(!QuartzExecutors.getInstance().deleteJob(jobName, jobGroupName)){
> logger.warn("set offline
> failure:projectId:{},scheduleId:{}",projectId,scheduleId); throw new
> RuntimeException(String.format("set offline failure")); }
> QuartzExecutors.getInstance():
> SchedulerFactory schedulerFactory = new
> StdSchedulerFactory(Constants.QUARTZ_PROPERTIES_PATH); scheduler =
> schedulerFactory.getScheduler();
> org.quartz.threadPool.threadCount = 25
> 25 worker threads are initialized by default.
> These threads will never be used.
>
>
> I didn't think about how to solve it, welcome to discuss.