Sahina Bose has posted comments on this change.

Change subject: engine: DB persistent quartz scheduler
......................................................................


Patch Set 3:

(6 comments)

@Moti,

Regarding your comments -
> How would you manage the jobs ? By plain insert/update/delete sql statements ?

> How would you support configuration variable (i.e. as rate/delay) for these 
> jobs ?

Jobs will be managed by SchedulerUtil. when a job is scheduled if the 
PERSISTENT_SCHEDULER bean is used, the job will be stored in the DB rather than 
in memory. Configuration variables for rate/delay will continue to be in 
VDC_OPTIONS

Patchset to follow

http://gerrit.ovirt.org/#/c/36297/3/backend/manager/modules/scheduler/src/main/java/org/ovirt/engine/core/utils/timer/SchedulerUtilQuartzDBImpl.java
File 
backend/manager/modules/scheduler/src/main/java/org/ovirt/engine/core/utils/timer/SchedulerUtilQuartzDBImpl.java:

> please use formatter to format the class
Done, formatted using Eclipse formatter with settings applied from 
config/engine-code-format.xml.
Line 1: package org.ovirt.engine.core.utils.timer;
Line 2: 
Line 3: import java.io.IOException;
Line 4: import java.util.Date;


Line 22: import org.quartz.impl.StdSchedulerFactory;
Line 23: import org.slf4j.Logger;
Line 24: import org.slf4j.LoggerFactory;
Line 25: 
Line 26: // Here we use a Singleton bean, names Scheduler.
> s/Scheduler/SchedulerDB
Done
Line 27: // The @Startup annotation is to make sure the bean is initialized on 
startup.
Line 28: // @ConcurrencyManagement - we use bean managed concurrency:
Line 29: // Singletons that use bean-managed concurrency allow full concurrent 
access to all the
Line 30: // business and timeout methods in the singleton.


Line 35: @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
Line 36: @ConcurrencyManagement(ConcurrencyManagementType.BEAN)
Line 37: public class SchedulerUtilQuartzDBImpl extends SchedulerUtilQuartzImpl 
implements SchedulerUtil {
Line 38: 
Line 39:     // members
> the comment is redundant
Done
Line 40:     private final Logger log = 
LoggerFactory.getLogger(SchedulerUtilQuartzDBImpl.class);
Line 41: 
Line 42:     /*
Line 43:      * retrieving the quartz scheduler from the factory.


http://gerrit.ovirt.org/#/c/36297/3/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ejb/BeanType.java
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ejb/BeanType.java:

Line 5:  */
Line 6: public enum BeanType {
Line 7:     BACKEND, // Backend bean
Line 8:     SCHEDULER, // SchedulerUtil
Line 9:     SCHEDULERDB, // SchedulerUtil
> perhaps PERSISTENT_SCHEDULER ?
Yes, good point. Done.
Line 10:     VDS_EVENT_LISTENER,
Line 11:     LOCK_MANAGER,
Line 12:     EVENTQUEUE_MANAGER,
Line 13:     CACHE_CONTAINER;


http://gerrit.ovirt.org/#/c/36297/3/packaging/dbscripts/upgrade/03_06_0590_insert_quartz_tables.sql
File packaging/dbscripts/upgrade/03_06_0590_insert_quartz_tables.sql:

Line 19:   (
Line 20:     sched_name VARCHAR(120) NOT NULL,
Line 21:     job_name  VARCHAR(200) NOT NULL,
Line 22:     job_group VARCHAR(200) NOT NULL,
Line 23:     description VARCHAR(250) NULL,
> Please consider text as datatype since description might be log and PG will
Done
Line 24:     job_class_name   VARCHAR(250) NOT NULL,
Line 25:     is_durable BOOL NOT NULL,
Line 26:     is_nonconcurrent BOOL NOT NULL,
Line 27:     is_update_data BOOL NOT NULL,


Line 36:     trigger_name VARCHAR(200) NOT NULL,
Line 37:     trigger_group VARCHAR(200) NOT NULL,
Line 38:     job_name  VARCHAR(200) NOT NULL,
Line 39:     job_group VARCHAR(200) NOT NULL,
Line 40:     description VARCHAR(250) NULL,
> same
Done
Line 41:     next_fire_time BIGINT NULL,
Line 42:     prev_fire_time BIGINT NULL,
Line 43:     priority INTEGER NULL,
Line 44:     trigger_state VARCHAR(16) NOT NULL,


-- 
To view, visit http://gerrit.ovirt.org/36297
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9a34dac95999cb6b3721d201c116fb5f6089bb61
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: anmolbabu <anb...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to