mirror of
https://github.com/NationalSecurityAgency/timely.git
synced 2026-11-09 17:36:01 -10:00
closes #77 - return error when there are too many downsample buckets
This commit is contained in:
1 parent
d37bf1c824
commit
dd30d54ed9
1 file changed
+4
@@ -457,6 +457,10 @@ public class DataStoreImpl implements DataStore {
|
||||
Map<String, String> orderedTags = orderTags(tagOrder, query.getTags());
|
||||
setQueryColumns(scanner, metric, orderedTags);
|
||||
long downsample = getDownsamplePeriod(query);
|
||||
if (((endTs - startTs) / downsample + 1) > Integer.MAX_VALUE) {
|
||||
throw new IOException(
|
||||
"Downsample not large enough for time range. Decrease time range or increase downsample period.");
|
||||
}
|
||||
LOG.trace("Downsample period {}", downsample);
|
||||
Class<? extends Aggregator> aggClass = getAggregator(query);
|
||||
LOG.trace("Aggregator type {}", aggClass.getSimpleName());
|
||||
|
||||
Reference in new issue
Block a user