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

Modification of NGSIElasticsearchSink #2194

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

santcorc
Copy link

@santcorc santcorc commented Sep 1, 2022

Changes in the NGSIElasticsearchSink to not append the date at the end of the index created. This was done due to the limit of 1000 shards per node of elasticsearch. Since each index by default needs 2 shards, in long term scenarios all the shards would be full leading to a stop in the storage. Thus, the addition of the date in the index does not provide useful information due to each attribute contains the hour and the date when it was created.

The documentation has also been modified to change the specification of this Sink.

@fgalan
Copy link
Member

fgalan commented Sep 1, 2022

Thanks for your contribution! :)

Could you provide a little of context, please? In which project are you using Cygnus ElasticSearch sink? Thanks!

@santcorc
Copy link
Author

santcorc commented Sep 2, 2022

I was using it in the european project Smart2B, to connect a orion context broker to elasticsearch. The objective of this is to store information from several sensors across different locations during a long term period (around 2 years). This is the reason why having a new index created everyday for each sensor did not make sense due to the great amount of shards needed in that case, taking account that could be around 200 sensors sending information every 10 minutes everyday.

@fgalan
Copy link
Member

fgalan commented Sep 13, 2022

Thanks for your explanation!

It seems that your proposed modification have broken the tests (see https://github.com/telefonicaid/fiware-cygnus/actions/runs/2970976609/jobs/4759074174). Could you have a look to them an fix it, please? We cannot merge a PR with broken tests...

@santcorc
Copy link
Author

I have modified the NGSIElasticsearchSinkTest according to the new behaviour, not requering to add the date at the end of the entities.

@fgalan
Copy link
Member

fgalan commented Sep 15, 2022

Note that after your last modifications in commit bda85fa GitHub is still reporting test fails. Could you have a look please?

Apart from that, please add a line in CHANGES_NEXT_RELEASE file regarding the change in this PR. Suggestion:

- [cygnus-ngsi][Elasticsearch] Simplify index generation removing date prefix

O something like that.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants