On 11/26/2014 02:50 PM, Yaniv Dary wrote:
----- Original Message -----
> From: "Yair Zaslavsky" <yzaslavs(a)redhat.com>
> To: "Sahina Bose" <sabose(a)redhat.com>
> Cc: devel(a)ovirt.org
> Sent: Wednesday, November 26, 2014 7:32:32 AM
> Subject: Re: [ovirt-devel] Certain questions about Quartz based scheduling in oVirt
>
>
>
> ----- Original Message -----
>> From: "Sahina Bose" <sabose(a)redhat.com>
>> To: "Moti Asayag" <masayag(a)redhat.com>, "Shubhendu
Tripathi"
>> <shtripat(a)redhat.com>
>> Cc: devel(a)ovirt.org
>> Sent: Tuesday, November 25, 2014 1:13:06 PM
>> Subject: Re: [ovirt-devel] Certain questions about Quartz based scheduling
>> in oVirt
>>
>>
>> On 11/24/2014 06:27 PM, Moti Asayag wrote:
>>> Hi Shubhendu,
>>>
>>> ----- Original Message -----
>>>> From: "Shubhendu Tripathi" <shtripat(a)redhat.com>
>>>> To: devel(a)ovirt.org
>>>> Sent: Monday, November 24, 2014 8:58:34 AM
>>>> Subject: [ovirt-devel] Certain questions about Quartz based scheduling
>>>> in
>>>> oVirt
>>>>
>>>> Hi All,
>>>>
>>>> We are in a requirement where we need to schedule jobs at certain time
>>>> interval, hourly, daily, weekly and monthly (i.e. repetitive and cron
>>>> kind of scheduling).
>>>> I was trying to understand quartz based scheduling mechanism in oVirt to
>>>> achieve the scenarios.
>>>>
>>>> Have some basic questions regarding the same -
>>>> 1. Is there is mechanism to persist the scheduling data in oVirt ?
>>> In ovirt we do not persist the jobs. The application reschedule the jobs
>>> when it starts
>>> and programmatically triggers jobs when required.
>>>
>>> On packaging/services/ovirt-engine/ovirt-engine.xml.in we specify the job
>>> store configuration
>>> as RAMJobStore, which is a volatile:
>>>
>>> <property name="org.quartz.jobStore.class"
>>> value="org.quartz.simpl.RAMJobStore"/>
>>>
>>> You may select other implementation. See:
>>>
http://quartz-scheduler.org/api/2.2.0/org/quartz/spi/JobStore.html
>> Would the correct approach then be to have multiple scheduler instances?
> Please bare in mind that quartz has the ability to perform
> Cron like scheduling (with cron expressions).
>
>
>
http://www.quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontr...
+1
I'm don't think creating a cron like ability in RHEV is needed this is why
cron/quartz exists.
Instances for users jobs should be added independently from RHEV.
Yes, we would use the quartz cron scheduling capabilities.
The point under discussion is the job persistence - to use Quartz's DB
persistence feature, so that we do not have to implement the logic of
instantiating these jobs on server restart
And if we need multiple scheduler instances - one that uses the volatile
RAMJobStore, and another that uses the persistent database job store
(JobStoreCMT)
thanks!
sahina
>
>
>> 1. - that uses the in memory job store
>>
>> 2. that uses DB to persist the jobs.
>>
>> The second instance would be used to schedule and manage any dynamic
>> jobs, for instance like the ones required for gluster volume snapshot
>> scheduling
>>
>> Using a separate instance also would mean there's no change to existing
>> jobs that are scheduled in Backend bean.
>>
>>
>>>> 2. How to tackle edit and rescheduling of jobs ?
>>>>
>>> You can have a look at org.ovirt.engine.core.utils.timer.SchedulerUtil
>>> interface in
>>> the 'scheduler' project which provides that functionality, and the
>>> related
>>> classes.
>>>
>>> But if not special requirements, i guess the shipped quartz
>>> implementation
>>> should be
>>> enough:
>>>
>>>
http://quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-l...
>>>
>>>> Kindly guide on how to achieve these.
>>>>
>>>> Thanks and Regards,
>>>> Shubhendu
>>>> _______________________________________________
>>>> Devel mailing list
>>>> Devel(a)ovirt.org
>>>>
http://lists.ovirt.org/mailman/listinfo/devel
>>>>
>>> _______________________________________________
>>> Devel mailing list
>>> Devel(a)ovirt.org
>>>
http://lists.ovirt.org/mailman/listinfo/devel
>> _______________________________________________
>> Devel mailing list
>> Devel(a)ovirt.org
>>
http://lists.ovirt.org/mailman/listinfo/devel
>>
> _______________________________________________
> Devel mailing list
> Devel(a)ovirt.org
>
http://lists.ovirt.org/mailman/listinfo/devel
>