Yair Zaslavsky has posted comments on this change.

Change subject: engine : Introduction of TaskHelper interface
......................................................................


Patch Set 13: Code-Review+2

(2 comments)

Hi,
Once again I have published some future thoughts.
I will be glad if you and Oved and address them.
I think that feature-wise for 3.5 we are ok , so I will approve, but I would 
really be happy if as a roadmap we can eliminate SPMTask, AsyncTask, whatever 
from Coco public method signatures (i.e - the interface) and if needed add 
abstractions.

http://gerrit.ovirt.org/#/c/26334/13/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/AsyncTaskManager.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/AsyncTaskManager.java:

Line 692:                         try {
Line 693:                             SPMTask task;
Line 694:                             if 
(partiallyCompletedCommandTasks.containsKey(creationInfo.getVdsmTaskId())) {
Line 695:                                 AsyncTasks asyncTaskInDb = 
partiallyCompletedCommandTasks.get(creationInfo.getVdsmTaskId());
Line 696:                                 task = coco.construct(creationInfo, 
asyncTaskInDb);
Hi,
Once again, returning to the discussion of Coco and whether it should have 
AsyncTask /SPMAsyncTask in method signatures .
Here for example maybe we can have some hierarchy of "TaskConstructor" (well, 
we need to think of the generic term that Coco will use - so here in the 
example I use task) - this way, you will have SPMAsyncTaskConstructor which 
will get creationInfo and asyncTaskInDB in params, and will return a task (the 
"generic term" object) for Coco.
If you feel you have time to do that, I will be glad.
If not - let's contact Barak and Oved and see if we can continue to work on 
that later on (after feature freeze).
Line 697:                                 if (task.getEntitiesMap() == null) {
Line 698:                                     task.setEntitiesMap(new 
HashMap<Guid, VdcObjectType>());
Line 699:                                 }
Line 700:                                 
partiallyCompletedCommandTasks.remove(task.getVdsmTaskId());


http://gerrit.ovirt.org/#/c/26334/13/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandCoordinatorImpl.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandCoordinatorImpl.java:

Line 94:      * @param asyncTaskCreationInfo Info on how to create the task
Line 95:      * @param parentCommand The type of command issuing the task
Line 96:      * @return An {@link SPMAsyncTask} object representing the task to 
be run
Line 97:      */
Line 98:     public SPMAsyncTask concreteCreateTask(
see previous comment on task construction.
Line 99:             Guid taskId,
Line 100:             CommandBase command,
Line 101:             AsyncTaskCreationInfo asyncTaskCreationInfo,
Line 102:             VdcActionType parentCommand) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7c5b3db8d679096aab5d791ba61084d54c26b9de
Gerrit-PatchSet: 13
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: David Caro <dcaro...@redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadg...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@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