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 <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: anmolbabu <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches