Sergey Gotliv has posted comments on this change. Change subject: engine: Display correct and user friendly size of iso files ......................................................................
Patch Set 4: (4 comments) .................................................... Commit Message Line 3: AuthorDate: 2013-09-24 14:09:54 +0300 Line 4: Commit: Sergey Gotliv <sgot...@redhat.com> Line 5: CommitDate: 2013-09-30 09:26:24 +0300 Line 6: Line 7: engine: Display correct and user friendly size of iso files Done Line 8: Line 9: Previously all iso files appear under Storage -> Images with bogus size Line 10: of '< 1 GB' although some of them are larger than that. It happened Line 11: because the 'getIsoList' API between Engine and VDSM returned only file Line 8: Line 9: Previously all iso files appear under Storage -> Images with bogus size Line 10: of '< 1 GB' although some of them are larger than that. It happened Line 11: because the 'getIsoList' API between Engine and VDSM returned only file Line 12: names, so Engine had no choice but to set their size to 0. :-) Line 13: Line 14: Now this API returns all information VDSM keeps about these files Line 15: including their size so Engine can display the correct value. Line 16: .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/IsoDomainListSyncronizer.java Line 59: public class IsoDomainListSyncronizer { Line 60: private static final Log log = LogFactory.getLog(IsoDomainListSyncronizer.class); Line 61: private List<RepoImage> problematicRepoFileList = new ArrayList<RepoImage>(); Line 62: private static final int MIN_TO_MILLISECONDS = 60 * 1000; Line 63: private static final long DEFAULT_ISO_FILE_SIZE = 0; Done Line 64: private static IsoDomainListSyncronizer isoDomainListSyncronizer; Line 65: private static final ConcurrentMap<Object, Lock> syncDomainForFileTypeMap = new ConcurrentHashMap<Object, Lock>(); Line 66: private int isoDomainRefreshRate; Line 67: RepoFileMetaDataDAO repoStorageDom; Line 585: } catch (NumberFormatException e) { Line 586: // Default file size(for backward compatibility) is used if for some reason VDSM will return Line 587: // non valid number as a size of the iso file Line 588: log.errorFormat("File's '{0}' size is illegal number", isoFileWithMetadata.getKey(), e); Line 589: return DEFAULT_ISO_FILE_SIZE; Done Line 590: } Line 591: } Line 592: Line 593: /** -- To view, visit http://gerrit.ovirt.org/19549 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I77bd99beb8138524b25f0afdcce0815ad8664f0f Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@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