* Return the 1h numeric data for the passed primary keys (schedule, timestamp)
* @param pks Primary keys to look up
* @return List of 1h data
*/
private List<AggregateNumericMetric> getOneHourDataForPKs(List<MeasurementDataPK> pks) {
MetricsDAO metricsDAO = storageManager.getMetricsDAO();
List<StorageResultSetFuture> futureResults = new ArrayList<StorageResultSetFuture>();
for (MeasurementDataPK pk : pks) {
// technically we could get more than 1 row but in practice this is not going to be the case.
// there are never going to be 2 measurements for a single schedule persisted within 1 millisecond.
StorageResultSetFuture f = metricsDAO
.findAggregateMetricsAsync(pk.getScheduleId(), Bucket.ONE_HOUR, pk.getTimestamp(), pk.getTimestamp() + 1);
futureResults.add(f);
}
AggregateNumericMetricMapper mapper = new AggregateNumericMetricMapper();