Skip to content
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

Remove timestampField from DataStreamTestHelper#newInstance(...) helper methods #85260

Conversation

martijnvg
Copy link
Member

This makes tests a bit cleaner.

The timestamp field is always @timestamp and in the future will likely
remove the 'timeStampField' field from DataStream class. Since in practice
it is always @timestamp.

When data streams was developed the idea was the timestamp field would be configurable.
We left it hardcode to '@timestamp', since that is the timestamp field for all Elastic
solutions. In the last years we have not found a reason to use any other timestamp field
than @timestamp so in the future will likely remove this 'timeStampField' field from
DataStream class, which currently is hardcoded to @timestamp.

…er methods.

This makes tests a bit cleaner.

The timestamp field is always '@timestamp' and in the future will likely
remove the 'timeStampField' field from `DataStream` class. Since in practice
it is always '@timestamp'.

When data streams was developed the idea was the timestamp field would be configurable.
We left it hardcode to '@timestamp', since that is the timestamp field for all Elastic
solutions. In the last years we have not found a reason to use any other timestamp field
than '@timestamp', so in the future will likely remove this 'timeStampField' field from
`DataStream` class, which currently is hardcoded to '@timestamp'.
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Mar 23, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

Copy link
Contributor

@joegallo joegallo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, and it has the Jenkins seal of approval. 🚢

@martijnvg martijnvg merged commit d0c2b09 into elastic:master Mar 23, 2022
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Mar 24, 2022
Timestamp field is always '@timestamp' and is already fixed to this field.
Removing this parameter from DataStream's constructors makes this clearer
and makes the code a bit cleaner too.

This change doesn't break bwc in any way or change the xcontent/binary format.
A next followup change may do this.

Followup from elastic#85260
elasticsearchmachine pushed a commit that referenced this pull request Mar 28, 2022
Timestamp field is always '@timestamp' and is already fixed to this
field. Removing this parameter from DataStream's constructors makes this
clearer and makes the code a bit cleaner too.

This change doesn't break bwc in any way or change the xcontent/binary
format. A next followup change may do this.

Followup from #85260
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Data streams Data streams and their lifecycles >non-issue Team:Data Management Meta label for data/management team v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants