Shubhendu Tripathi has posted comments on this change. Change subject: gluster: Sync job for gluster volume snapshots ......................................................................
Patch Set 11: (6 comments) http://gerrit.ovirt.org/#/c/35904/11/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterSnapshotSyncJob.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterSnapshotSyncJob.java: Line 73: if (upServer == null) { Line 74: return; Line 75: } Line 76: Line 77: VDSReturnValue returnValue = runVdsCommand(VDSCommandType.GetGlusterVolumeSnapshotInfo, > If you are storing the return value from runVdsCommand, why not already cas yes. will do that. Line 78: new GlusterVolumeSnapshotVDSParameters(upServer.getId(), Line 79: null, Line 80: cluster.getId())); Line 81: try { Line 94: if (upServer == null) { Line 95: return; Line 96: } Line 97: Line 98: VDSReturnValue returnValue = > same as before. done Line 99: runVdsCommand(VDSCommandType.GetGlusterVolumeSnapshotConfigInfo, Line 100: new GlusterVolumeSnapshotVDSParameters(upServer.getId(), Line 101: null, Line 102: cluster.getId())); Line 118: volumeWiseSnapshots.get(snapshot.getVolumeId()).add(snapshot); Line 119: } Line 120: Line 121: try { Line 122: List<GlusterVolumeSnapshotEntity> updatedSnapshots = new ArrayList<GlusterVolumeSnapshotEntity>(); > Use JDK 7 diamond operator, please, i.e - new ArrayList<>(); done Line 123: List<GlusterVolumeSnapshotEntity> newlyAddedSnapshots = new ArrayList<GlusterVolumeSnapshotEntity>(); Line 124: List<GlusterVolumeSnapshotEntity> deletedSnapshots = new ArrayList<GlusterVolumeSnapshotEntity>(); Line 125: Line 126: for (Map.Entry<Guid, List<GlusterVolumeSnapshotEntity>> entry : volumeWiseSnapshots.entrySet()) { Line 119: } Line 120: Line 121: try { Line 122: List<GlusterVolumeSnapshotEntity> updatedSnapshots = new ArrayList<GlusterVolumeSnapshotEntity>(); Line 123: List<GlusterVolumeSnapshotEntity> newlyAddedSnapshots = new ArrayList<GlusterVolumeSnapshotEntity>(); > same. done Line 124: List<GlusterVolumeSnapshotEntity> deletedSnapshots = new ArrayList<GlusterVolumeSnapshotEntity>(); Line 125: Line 126: for (Map.Entry<Guid, List<GlusterVolumeSnapshotEntity>> entry : volumeWiseSnapshots.entrySet()) { Line 127: List<GlusterVolumeSnapshotEntity> fetchedVolumeSnapshots = entry.getValue(); Line 120: Line 121: try { Line 122: List<GlusterVolumeSnapshotEntity> updatedSnapshots = new ArrayList<GlusterVolumeSnapshotEntity>(); Line 123: List<GlusterVolumeSnapshotEntity> newlyAddedSnapshots = new ArrayList<GlusterVolumeSnapshotEntity>(); Line 124: List<GlusterVolumeSnapshotEntity> deletedSnapshots = new ArrayList<GlusterVolumeSnapshotEntity>(); > same done Line 125: Line 126: for (Map.Entry<Guid, List<GlusterVolumeSnapshotEntity>> entry : volumeWiseSnapshots.entrySet()) { Line 127: List<GlusterVolumeSnapshotEntity> fetchedVolumeSnapshots = entry.getValue(); Line 128: Map<Guid, GlusterVolumeSnapshotEntity> fetchedSnapshotsMap = Line 276: protected GlusterVolumeSnapshotConfigDao getGlusterVolumeSnapshotConfigDao() { Line 277: return DbFacade.getInstance().getGlusterVolumeSnapshotConfigDao(); Line 278: } Line 279: Line 280: protected EngineLock acquireEntityLock(Guid entityId) { > override from base class? (not sure, please check) , if so - I would prefer sure. will do that. Line 281: return GlusterUtil.getInstance().acquireGlusterLockWait(entityId); Line 282: } -- To view, visit http://gerrit.ovirt.org/35904 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7b7bf79b72fc5680dab301b290e7aa860d5c714d Gerrit-PatchSet: 11 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shubhendu Tripathi <shtri...@redhat.com> Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com> Gerrit-Reviewer: Ramesh N <rnach...@redhat.com> Gerrit-Reviewer: Sahina Bose <sab...@redhat.com> Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org 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