-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Rollup] Only allow aggregating on multiples of configured interval #32052
Merged
polyfractal
merged 13 commits into
elastic:master
from
polyfractal:rollup_histo_multiples
Aug 29, 2018
Merged
Changes from 4 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7191354
[Rollup] Only allow aggregating on multiples of configured interval
polyfractal 5ee0e33
Merge remote-tracking branch 'origin/master' into rollup_histo_multiples
polyfractal 4dda0ce
Docs test fix: docs were using an incompatible time interval
polyfractal fc4d403
Fix interval in rollup IT
polyfractal 563e276
Merge remote-tracking branch 'origin/master' into rollup_histo_multiples
polyfractal 163b422
Documentation tweaks
polyfractal 8794ffb
More doc tweaks
polyfractal 010f325
Merge remote-tracking branch 'origin/master' into rollup_histo_multiples
polyfractal d939c4d
Merge remote-tracking branch 'origin/master' into rollup_histo_multiples
polyfractal 579f436
Fix intervals in docs
polyfractal adf4e74
MOre doc tweaks
polyfractal 205574d
Merge remote-tracking branch 'origin/master' into rollup_histo_multiples
polyfractal 0ba466a
checkstyle
polyfractal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,9 +80,24 @@ The response will tell you that the field and aggregation were not possible, bec | |
[float] | ||
=== Interval Granularity | ||
|
||
Rollups are stored at a certain granularity, as defined by the `date_histogram` group in the configuration. If data is rolled up at hourly | ||
intervals, the <<rollup-search>> API can aggregate on any time interval hourly or greater. Intervals that are less than an hour will throw | ||
an exception, since the data simply doesn't exist for finer granularities. | ||
Rollups are stored at a certain granularity, as defined by the `date_histogram` group in the configuration. This means you | ||
can only search/aggregate the rollup data with an interval that is greater-than or equal to the configured rollup interval. | ||
|
||
For example, if data is rolled up at hourlyintervals, the <<rollup-search>> API can aggregate on any time interval | ||
hourly or greater. Intervals that are less than an hour will throwan exception, since the data simply doesn't | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: throwan => "throw an" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: hourlyintervals => hourly intervals |
||
exist for finer granularities. | ||
|
||
.Requests must be multiples of the config | ||
********************************** | ||
Perhaps not immediately apparent, but the interval specified in an aggregation request must be a whole | ||
multiple of the configured interval. If the job was configured to rollup on `3d` intervals, you can only | ||
query and aggregate on multiples of three (`3d`, `6d`, `9d`, etc). | ||
|
||
A non-multiple wouldn't work, since the rolled up data wouldn't cleanly "overlap" with the buckets generated | ||
by the aggregation, leading to incorrect results. | ||
|
||
For that reason, an error is thrown if a whole multiple of the configured interval isn't found. | ||
jimczi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
********************************** | ||
|
||
Because the RollupSearch endpoint can "upsample" intervals, there is no need to configure jobs with multiple intervals (hourly, daily, etc). | ||
It's recommended to just configure a single job with the smallest granularity that is needed, and allow the search endpoint to upsample | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why changing to a calendar interval here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I was changing units to fixed and just got carried away without thinking what I was doing. Thanks for spotting