Merged
Conversation
Collaborator
|
Pinging @elastic/es-analytics-geo (:Analytics/Rollup) |
21 tasks
62b76a5 to
be90dd3
Compare
Contributor
Author
|
run elasticsearch-ci/2 |
Contributor
Author
|
For the reviewers @csoulios and @not-napoleon, I am still working on making more of the indexer logic unit-testable. I would love some feedback on the general process and any large gotchyas you may see. There is a lot of state change and index dancing. I do intend to make these parts a bit more resilient, but that may not be a part of this PR pending further discussion! thanks! |
This commit adds a new endpoint for Rollup V2, a new way to rollup indices.
Instead of relying on a cron-job, this action will rollup a whole index on the spot.
When an index is rolled up using a Rollup Config, it does the following
1. check that original index is read-only
2. runs an aggregation and indexes results into a temporary hidden rollup index
3. "resizes" the temporary index into the final rollup-index (in-place segment pointer juggling)
4. adds RollupMetadata about the rollup-group (keyed by original index name) and adds custom index-metadata with data about what the rollup index's original index is so that its group information in RollupMetadata can be looked up
example usage:
```
POST /_rollup_vtwo/index
{
"rollup_index": "index_rolled",
"groups": {
"date_histogram": {
"field": "date",
"calendar_interval": "1M"
},
"terms": {
"fields": ["unit"]
}
},
"metrics": [
{
"field": "temperature",
"metrics": ["sum"]
}
]
}
```
be90dd3 to
1a3e115
Compare
not-napoleon
approved these changes
Nov 19, 2020
Member
not-napoleon
left a comment
There was a problem hiding this comment.
I left a few thoughts, but I don't think any of them are blockers to merging.
server/src/main/java/org/elasticsearch/cluster/ClusterModule.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/rollup/v2/RollupV2Action.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/rollup/v2/RollupV2Action.java
Outdated
Show resolved
Hide resolved
...k/plugin/rollup/src/main/java/org/elasticsearch/xpack/rollup/v2/TransportRollupV2Action.java
Outdated
Show resolved
Hide resolved
talevy
added a commit
to talevy/elasticsearch
that referenced
this pull request
Nov 23, 2020
This commit adds a new endpoint for Rollup V2, a new way to rollup indices.
Instead of relying on a cron-job, this action will rollup a whole index on the spot.
When an index is rolled up using a Rollup Config, it does the following
1. check that original index is read-only
2. runs an aggregation and indexes results into a temporary hidden rollup index
3. "resizes" the temporary index into the final rollup-index (in-place segment pointer juggling)
4. adds RollupMetadata about the rollup-group (keyed by original index name) and adds
custom index-metadata with data about what the rollup index's original index is so that its
group information in RollupMetadata can be looked up
example usage:
```
POST /_rollup_vtwo/index
{
"rollup_index": "index_rolled",
"groups": {
"date_histogram": {
"field": "date",
"calendar_interval": "1M"
},
"terms": {
"fields": ["unit"]
}
},
"metrics": [
{
"field": "temperature",
"metrics": ["sum"]
}
]
}
```
relates elastic#42720.
talevy
added a commit
that referenced
this pull request
Nov 24, 2020
This commit adds a new endpoint for Rollup V2, a new way to rollup indices.
Instead of relying on a cron-job, this action will rollup a whole index on the spot.
When an index is rolled up using a Rollup Config, it does the following
1. check that original index is read-only
2. runs an aggregation and indexes results into a temporary hidden rollup index
3. "resizes" the temporary index into the final rollup-index (in-place segment pointer juggling)
4. adds RollupMetadata about the rollup-group (keyed by original index name) and adds
custom index-metadata with data about what the rollup index's original index is so that its
group information in RollupMetadata can be looked up
example usage:
```
POST /_rollup_vtwo/index
{
"rollup_index": "index_rolled",
"groups": {
"date_histogram": {
"field": "date",
"calendar_interval": "1M"
},
"terms": {
"fields": ["unit"]
}
},
"metrics": [
{
"field": "temperature",
"metrics": ["sum"]
}
]
}
```
relates #42720.
csoulios
added a commit
that referenced
this pull request
May 25, 2022
This PR implements downsampling operation on time series indices.
The PR creates a _rollup endpoint that allows users to downsample an index and can be
accessed by the following call:
POST /<source_index>/_rollup/<rollup_index>
{
"fixed_interval": "1d"
}
Requirements
An index can be downsampled if all of the following requirements are met:
Must be a time series index (have the index.mode: time_series index setting)
Must not be writeable (have the index.blocks.write: true index setting)
Must have dimension fields marked with mapping parameter time_series_dimension: true
Must have metric fields marked with mapping parameter time_series_metric
Relates to #74660
Fixes #65769
Fixes #69799
Finally, this PR is based on the code written for #64900
salvatore-campagna
pushed a commit
to salvatore-campagna/elasticsearch
that referenced
this pull request
May 26, 2022
This PR implements downsampling operation on time series indices.
The PR creates a _rollup endpoint that allows users to downsample an index and can be
accessed by the following call:
POST /<source_index>/_rollup/<rollup_index>
{
"fixed_interval": "1d"
}
Requirements
An index can be downsampled if all of the following requirements are met:
Must be a time series index (have the index.mode: time_series index setting)
Must not be writeable (have the index.blocks.write: true index setting)
Must have dimension fields marked with mapping parameter time_series_dimension: true
Must have metric fields marked with mapping parameter time_series_metric
Relates to elastic#74660
Fixes elastic#65769
Fixes elastic#69799
Finally, this PR is based on the code written for elastic#64900
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This commit adds a new endpoint for Rollup V2, a new way to rollup indices.
Instead of relying on a cron-job, this action will rollup a whole index on the spot.
When an index is rolled up using a Rollup Config, it does the following
example usage: