Sahina Bose has posted comments on this change. Change subject: gluster: Query for gluster volume rebalance status ......................................................................
Patch Set 17: (3 comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetGlusterVolumeRebalanceStatusQuery.java Line 25: Line 26: @Override Line 27: protected void executeQueryCommand() { Line 28: clusterId = getParameters().getClusterId(); Line 29: Guid volumeId = getParameters().getVolumeId(); What if clusterId is null? (Could be called from API as well) Line 30: Line 31: if (volumeId != null) { Line 32: volume = getGlusterVolumeDao().getById(volumeId); Line 33: if (volume == null) { Line 30: Line 31: if (volumeId != null) { Line 32: volume = getGlusterVolumeDao().getById(volumeId); Line 33: if (volume == null) { Line 34: throw new RuntimeException(String.format("Invalid volume id %s", volumeId)); Can we use a VdcBllMessages? Line 35: } Line 36: asyncTask = volume.getAsyncTask(); Line 37: if(asyncTask == null) { Line 38: // Set status as null and return as there is not rebalance task started Line 52: // Set the volume re-balance start time Line 53: GlusterVolumeTaskStatusEntity entity = (GlusterVolumeTaskStatusEntity)returnValue.getReturnValue(); Line 54: List<Step> stepsList = getDbFacade().getStepDao().getStepsByExternalId(asyncTask.getStepId()); Line 55: if (stepsList != null && !stepsList.isEmpty()) { Line 56: entity.setStartTime(stepsList.get(0).getStartTime()); Shouldn't you also set the stopped at time, if the task status is Aborted? Line 57: } Line 58: Line 59: return entity; Line 60: } -- To view, visit http://gerrit.ovirt.org/18352 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3704f750fafcf3546c5237a4dde67b5f85a691e4 Gerrit-PatchSet: 17 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shubhendu Tripathi <shtri...@redhat.com> Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@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: 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