-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Use @timestamp field to route documents to a backing index of a data stream #82079
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
Changes from all commits
9581ae4
9f109d4
d540c49
3fd011d
ffd5b69
53dae1d
d70aa28
36af27e
efdd833
f97d889
2de64c3
2bab109
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,8 @@ | |
| import org.elasticsearch.action.support.replication.ReplicatedWriteRequest; | ||
| import org.elasticsearch.action.support.replication.ReplicationRequest; | ||
| import org.elasticsearch.client.internal.Requests; | ||
| import org.elasticsearch.cluster.metadata.IndexAbstraction; | ||
| import org.elasticsearch.cluster.metadata.Metadata; | ||
| import org.elasticsearch.cluster.routing.IndexRouting; | ||
| import org.elasticsearch.common.UUIDs; | ||
| import org.elasticsearch.common.bytes.BytesArray; | ||
|
|
@@ -28,6 +30,7 @@ | |
| import org.elasticsearch.common.unit.ByteSizeValue; | ||
| import org.elasticsearch.common.xcontent.XContentHelper; | ||
| import org.elasticsearch.core.Nullable; | ||
| import org.elasticsearch.index.Index; | ||
| import org.elasticsearch.index.VersionType; | ||
| import org.elasticsearch.index.mapper.MapperService; | ||
| import org.elasticsearch.index.shard.ShardId; | ||
|
|
@@ -718,6 +721,11 @@ public boolean isRequireAlias() { | |
| return requireAlias; | ||
| } | ||
|
|
||
| @Override | ||
| public Index getConcreteWriteIndex(IndexAbstraction ia, Metadata metadata) { | ||
|
Contributor
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. It feels like a bit too much logic for a data class, that the IndexRequest is essentially is. I wonder if it makes more sense as a part of IndexAbstraction instead.
Member
Author
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. Implemented via: f97d889 |
||
| return ia.getWriteIndex(this, metadata); | ||
| } | ||
|
|
||
| @Override | ||
| public int route(IndexRouting indexRouting) { | ||
| assert id != null : "route must be called after process"; | ||
|
|
||
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.
Can you add javadocs for this?
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.
Added via: efdd833