Shubhendu Tripathi has posted comments on this change.

Change subject: gluster: WIP - BLL command for scheduling volume snapshot
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.ovirt.org/#/c/36980/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterSnapshotScheduleJob.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterSnapshotScheduleJob.java:

Line 29: 
Line 30:     public GlusterSnapshotScheduleJob() {
Line 31:     }
Line 32: 
Line 33:     public static GlusterSnapshotScheduleJob getInstance() {
> why do you need this ?
Not required. I can use GLusterSnapshotScheduleJob.class when needed
Line 34:         return instance;
Line 35:     }
Line 36: 
Line 37:     @OnTimerMethodAnnotation("onTimer")


http://gerrit.ovirt.org/#/c/36980/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ReScheduleGlusterVolumeSnapshotCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ReScheduleGlusterVolumeSnapshotCommand.java:

Line 21: import 
org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotScheduleDao;
Line 22: import org.ovirt.engine.core.utils.timer.SchedulerUtil;
Line 23: import org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzDBImpl;
Line 24: 
Line 25: public class ReScheduleGlusterVolumeSnapshotCommand extends 
GlusterVolumeCommandBase<ScheduleGlusterVolumeSnapshotParameters> {
> Can you roll this into ScheduleGlusterVolumeSnapshotCommand? or maybe exten
Will try that
Line 26:     private GlusterVolumeSnapshotSchedule schedule;
Line 27:     private Guid volumeId;
Line 28:     private boolean force;
Line 29: 


Line 58:         scheduler.deleteJob(jobId);
Line 59: 
Line 60:         // create a new job with same id
Line 61:         String cronExpression = 
GlusterUtil.getInstance().getCronExpression(schedule);
Line 62:         String newJobId = 
scheduler.scheduleACronJob(GlusterSnapshotScheduleJob.class,
> You may need to have a catch block to handle and log exceptions
done
Line 63:                 "onTimer",
Line 64:                 new Class[] { Guid.class, Guid.class, String.class, 
String.class, Boolean.class },
Line 65:                 new Object[] { upServer.getId(), volumeId, 
schedule.getSnapshotNamePrefix(),
Line 66:                         schedule.getSnapshotDescription(), force },


http://gerrit.ovirt.org/#/c/36980/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ScheduleGlusterVolumeSnapshotCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ScheduleGlusterVolumeSnapshotCommand.java:

Line 55:         if (jobId != null) {
Line 56:             setSucceeded(true);
Line 57:             schedule.setJobId(jobId);
Line 58:             getGlusterVolumeSnapshotScheduleDao().save(schedule);
Line 59:         }
> else setSucceded(false) ?
done
Line 60:     }
Line 61: 
Line 62:     private String scheduleJob() {
Line 63:         String cronExpression = 
GlusterUtil.getInstance().getCronExpression(schedule);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4326ebb0c146eadceb6ae30cce73ece132749dc5
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to