Sahina Bose has posted comments on this change.

Change subject: gluster: dao changes for volume capacity info
......................................................................


Patch Set 15:

(2 comments)

http://gerrit.ovirt.org/#/c/23010/15/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterBrickDaoDbFacadeImpl.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterBrickDaoDbFacadeImpl.java:

Line 232:         @Override
Line 233:         public BrickProperties mapRow(ResultSet rs, int rowNum)
Line 234:                 throws SQLException {
Line 235:             BrickProperties brickProperties = new BrickProperties();
Line 236:             brickProperties.setTotalSize(rs.getLong("total_space") / 
SizeConverter.BYTES_IN_MB);
Can you not use SizeConverter.convert instead?
Line 237:             brickProperties.setFreeSize(rs.getLong("free_space") / 
SizeConverter.BYTES_IN_MB);
Line 238:             return brickProperties;
Line 239:         }
Line 240:     }


Line 287: 
Line 288:     private MapSqlParameterSource 
createBrickPropertiesParam(BrickProperties brickProperties) {
Line 289:         return getCustomMapSqlParameterSource()
Line 290:                 .addValue("brick_id", brickProperties.getBrickId())
Line 291:                 .addValue("total_space", 
brickProperties.getTotalSize() * SizeConverter.BYTES_IN_MB)
SizeConverter.convert?
Line 292:                 .addValue("used_space",
Line 293:                         (brickProperties.getTotalSize() - 
brickProperties.getFreeSize()) * SizeConverter.BYTES_IN_MB)
Line 294:                 .addValue("free_space", brickProperties.getFreeSize() 
* SizeConverter.BYTES_IN_MB);
Line 295:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7d67b7ee22f4cb6839d0f14d3f27f3e22149ff22
Gerrit-PatchSet: 15
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ramesh N <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Ramesh N <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[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

Reply via email to