Moti Asayag has posted comments on this change.
Change subject: gluster: Override CommandBase.getJobMessageProperties
......................................................................
Patch Set 1: (1 inline comment)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterCommandBase.java
Line 60:
Line 61: @Override
Line 62: public Map<String, String> getJobMessageProperties() {
Line 63: if (jobProperties == null) {
Line 64: jobProperties = new HashMap<String, String>();
I find it more readable like this and serves it purpose better.
The default behaviour of CommandBase.getJobMessageProperties is complicated
comparing to this one: It uses DbFacade.getEntityNameByIdAndType which is a
long and complicated stored procedure instead calling directly the
getVdsGroup() which access the exact table in a clear way.
The purpose of CommandBase.getJobMessageProperties was to provide a basic
implementation relying on the permission entities required for each command,
but it creates a non-requried coupling between 2 different mechanism: the MLA
and the Task monitoring.
However, due to time constrains and since there is a big amount of commands, a
basic implementation was provided.
I'd like to reduce this coupling, perhaps till the point in which
CommandBase.getJobMessageProperties could be defined as an abstract one so each
command that could be monitored will provide its own set of monitored entities.
Line 65: VDSGroup vdsGroup = getVdsGroup();
Line 66:
jobProperties.put(VdcObjectType.VdsGroups.name().toLowerCase(),
Line 67: vdsGroup == null ? null : vdsGroup.getname());
Line 68: }
--
To view, visit http://gerrit.ovirt.org/10988
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I393621e3f52b343b8dc5916f20497a0da3aa3bf1
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches