use of com.emc.nas.vnxfile.xmlapi.VolumeSetStats in project coprhd-controller by CoprHD.
the class VNXVolumeStatsProcessor method processResult.
@SuppressWarnings("unchecked")
@Override
public void processResult(Operation operation, Object resultObj, Map<String, Object> keyMap) throws BaseCollectionException {
final PostMethod result = (PostMethod) resultObj;
_logger.info("processing volumeStats response" + resultObj);
try {
ResponsePacket responsePacket = (ResponsePacket) _unmarshaller.unmarshal(result.getResponseBodyAsStream());
List<Object> volumeStats = getQueryStatsResponse(responsePacket);
Iterator<Object> iterator = volumeStats.iterator();
Map<String, String> volFileMap = (Map<String, String>) keyMap.get(VNXFileConstants.VOLFILESHAREMAP);
List<Stat> statsList = (List<Stat>) keyMap.get(VNXFileConstants.STATS);
// and proceed with rest of the Mover stats.
while (iterator.hasNext()) {
VolumeSetStats volStats = (VolumeSetStats) iterator.next();
List<Sample> sampleList = volStats.getSample();
processVolumeSampleList(sampleList, keyMap, volFileMap, statsList);
}
} catch (final Exception ex) {
_logger.error("Exception occurred while processing the volume stats response due to {}", ex.getMessage());
} finally {
result.releaseConnection();
}
}
Aggregations