Sahina Bose has posted comments on this change.

Change subject: engine : Query to fetch list of volumes eligible for geo 
replication
......................................................................


Patch Set 21: Code-Review+1

(2 comments)

Minor comments

http://gerrit.ovirt.org/#/c/33845/21/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/GlusterGeoRepUtil.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/GlusterGeoRepUtil.java:

Line 24:         return instance;
Line 25:     }
Line 26: 
Line 27:     public Map<GlusterGeoRepNonEligibilityReason, 
Predicate<GlusterVolumeEntity>> getEligibilityPredicates(final 
GlusterVolumeEntity masterVolume) {
Line 28:         Map<GlusterGeoRepNonEligibilityReason, 
Predicate<GlusterVolumeEntity>> eligibilityPredicates = new 
HashMap<GlusterGeoRepNonEligibilityReason, Predicate<GlusterVolumeEntity>>();
you can just use new HashMap<>()
Line 29:         final List<Guid> existingSessionSlavesIds = 
getSessionSlaveVolumeIds();
Line 30: 
Line 31: 
Line 32:         
eligibilityPredicates.put(GlusterGeoRepNonEligibilityReason.SLAVE_VOLUME_SHOULD_BE_UP,
 new Predicate<GlusterVolumeEntity>() {


Line 31: 
Line 32:         
eligibilityPredicates.put(GlusterGeoRepNonEligibilityReason.SLAVE_VOLUME_SHOULD_BE_UP,
 new Predicate<GlusterVolumeEntity>() {
Line 33:             @Override
Line 34:             public boolean eval(GlusterVolumeEntity slaveVolume) {
Line 35:                 boolean eligible = 
slaveVolume.getStatus().equals(GlusterStatus.UP);
why not just "return slaveVolume.getStatus() == GlusterStatus.UP"
Line 36:                 return eligible;
Line 37:             }
Line 38:         });
Line 39: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0fc3ecb15535181f1ca2a8780461cb89788a3f41
Gerrit-PatchSet: 21
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <anb...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: Ramesh N <rnach...@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