anmolbabu has posted comments on this change.

Change subject: gluster : In the task tab, size of rebalanced files is shown 
with units
......................................................................


Patch Set 19:

(1 comment)

....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/SizeConverter.java
Line 43:     }
Line 44: 
Line 45:     public static Size autoConvert(long size, SizeUnit inUnit) {
Line 46: 
Line 47:         for (long i = weightToUnit.size(); i >= 
inUnit.getUnitWeight(); i--) {
the actual purpose of this map is to
1. Iterate over units 
       and also
2. to have a conversion mechanism from a weight - (i) to its unit.
So,would it better to have a list of pair instead?
Line 48:             if (size / Math.pow(CONVERT_FACTOR, i - 1) >= 1) {
Line 49:                 return new 
SizeConverter.Size(SizeConverter.SizeUnit.getUnit(i), 
SizeConverter.convert(size,
Line 50:                         inUnit,
Line 51:                         SizeUnit.getUnit(i)).doubleValue());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iea6c90a098bfddfb616bc2b8ce58c9d0bb567f66
Gerrit-PatchSet: 19
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <anb...@redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com>
Gerrit-Reviewer: anmolbabu <anb...@redhat.com>
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