Shireesh Anjal has posted comments on this change.
Change subject: engine: Refresh gluster data periodically
......................................................................
Patch Set 16: (6 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterManager.java
Line 524: }
Line 525:
Line 526: @Override
Line 527: public Map<String, String> getCustomValues() {
Line 528: Map<String, String> customValues = new
HashMap<String, String>();
Done
Line 529: if (entityName != null && entityValue != null) {
Line 530: customValues.put(entityName, entityValue);
Line 531: }
Line 532: return customValues;
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterBrickEntity.java
Line 125: }
Line 126:
Line 127: GlusterBrickEntity brick = (GlusterBrickEntity) obj;
Line 128: return (getId().equals(brick.getId())
Line 129: && GlusterCoreUtil.objectsEqual(volumeId,
brick.getVolumeId())
commons-lang is not allowed in the 'common' project as it will fail the
frontend's gwt compilation.
Have created a separate patch http://gerrit.ovirt.org/8434 these generic
methods to more generic utility classes. Next patch-set will make this patch
dependent on that one.
Line 130: && GlusterCoreUtil.objectsEqual(serverId,
brick.getServerId())
Line 131: && GlusterCoreUtil.objectsEqual(brickDirectory,
brick.getBrickDirectory())
Line 132: && GlusterCoreUtil.objectsEqual(brickOrder,
brick.getBrickOrder())
Line 133: && status == brick.getStatus());
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/gluster/GlusterCoreUtil.java
Line 36: *
Line 37: * @param oldList
Line 38: * @param newList
Line 39: * @return collection of elements that are not present in
<code>oldList</code>, but present in <code>newList</code>
Line 40: */
Done
Line 41: public static <T> Collection<T> getAddedElements(Collection<T>
oldList, Collection<T> newList) {
Line 42: List<T> addedElements = new ArrayList<T>();
Line 43: for (T element : newList) {
Line 44: if (!oldList.contains(element)) {
Line 38: * @param newList
Line 39: * @return collection of elements that are not present in
<code>oldList</code>, but present in <code>newList</code>
Line 40: */
Line 41: public static <T> Collection<T> getAddedElements(Collection<T>
oldList, Collection<T> newList) {
Line 42: List<T> addedElements = new ArrayList<T>();
Could you please elaborate?
Line 43: for (T element : newList) {
Line 44: if (!oldList.contains(element)) {
Line 45: addedElements.add(element);
Line 46: }
Line 70: return qualifiedBricks;
Line 71: }
Line 72:
Line 73: /**
Line 74: * Checks if given brick <code>searchBrick</code> exists in the
given collection of bricks. Note that this method
After moving the generic methods like objectsEqual to other classes, this class
mainly contains brick related utility methods. I would like to have a single
GlusterCoreUtil class for various gluster related utility methods. If you still
insist, I will rename this class to GlusterBrickUtils.
Line 75: * checks only two (and most important) attributes of the brick:
server id and brick directory
Line 76: *
Line 77: * @param bricks
Line 78: * @param searchBrick
....................................................
File
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumesListReturnForXmlRpc.java
Line 70:
Line 71: switch (volume.getVolumeType()) {
Line 72: case REPLICATE:
Line 73: case DISTRIBUTED_REPLICATE:
Line 74: volume.setReplicaCount(Integer.valueOf((String)
map.get(REPLICA_COUNT)));
I'm not sure I understand. Could you please elaborate?
Line 75: break;
Line 76: case STRIPE:
Line 77: case DISTRIBUTED_STRIPE:
Line 78: volume.setStripeCount(Integer.valueOf((String)
map.get(STRIPE_COUNT)));
--
To view, visit http://gerrit.ovirt.org/7288
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6b61eb6e93105e46e2706eac1d94bc10717224c2
Gerrit-PatchSet: 16
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shireesh Anjal <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches