Integer scheduleId = (Integer) tupple[2];
scheduleIdsMap.put(definitionName, scheduleId);
}
StorageNodeLoadComposite result = new StorageNodeLoadComposite(node, beginTime, endTime);
MeasurementAggregate totalDiskUsedAggregate = new MeasurementAggregate(0d, 0d, 0d);
Integer scheduleId = null;
// find the aggregates and enrich the result instance
if (!scheduleIdsMap.isEmpty()) {
try {
if ((scheduleId = scheduleIdsMap.get(METRIC_TOKENS)) != null) {
MeasurementAggregate tokensAggregate = measurementManager.getMeasurementAggregate(subject,
scheduleId, beginTime, endTime);
result.setTokens(tokensAggregate);
}
if ((scheduleId = scheduleIdsMap.get(METRIC_OWNERSHIP)) != null) {
StorageNodeLoadComposite.MeasurementAggregateWithUnits ownershipAggregateWithUnits = getMeasurementAggregateWithUnits(
subject, scheduleId, MeasurementUnits.PERCENTAGE, beginTime, endTime);
result.setActuallyOwns(ownershipAggregateWithUnits);
}
//calculated disk space related metrics
if ((scheduleId = scheduleIdsMap.get(METRIC_DATA_DISK_USED_PERCENTAGE)) != null) {
StorageNodeLoadComposite.MeasurementAggregateWithUnits dataDiskUsedPercentageAggregateWithUnits = getMeasurementAggregateWithUnits(
subject, scheduleId, MeasurementUnits.PERCENTAGE, beginTime, endTime);
result.setDataDiskUsedPercentage(dataDiskUsedPercentageAggregateWithUnits);
}
if ((scheduleId = scheduleIdsMap.get(METRIC_TOTAL_DISK_USED_PERCENTAGE)) != null) {
StorageNodeLoadComposite.MeasurementAggregateWithUnits totalDiskUsedPercentageAggregateWithUnits = getMeasurementAggregateWithUnits(
subject, scheduleId, MeasurementUnits.PERCENTAGE, beginTime, endTime);
result.setTotalDiskUsedPercentage(totalDiskUsedPercentageAggregateWithUnits);
}
if ((scheduleId = scheduleIdsMap.get(METRIC_FREE_DISK_TO_DATA_RATIO)) != null) {
MeasurementAggregate freeDiskToDataRatioAggregate = measurementManager.getMeasurementAggregate(
subject, scheduleId, beginTime, endTime);
result.setFreeDiskToDataSizeRatio(freeDiskToDataRatioAggregate);
}
if ((scheduleId = scheduleIdsMap.get(METRIC_LOAD)) != null) {