opensearch-project / opensearch-project/data-prepper
[BUG] data-prepper sink fails to create templates when `number_of_shards` is passed
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 374
- Forks
- 354
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 8
Description
Describe the bug
I have data-prepper creating templates and sending data with no issue
This is the config
sink:
- opensearch:
hosts: ["$${OS_HOST}"]
username: $${OS_USER}
password: $${OS_PASS}
index_type: trace-analytics-raw
template_type: index-template
max_retries: 10
My cluster sets the number of shards=5 as the default value for new indices being rolled over.
So, I tried adding an extra line to change that settings as stated here in the docs
number_of_shards: 1
But as soon I restart the service it starts to fail with the following error
Request failed: [x_content_parse_exception] [1:1118] [index_template] unknown field [settings]
To Reproduce
Steps to reproduce the behavior:
- Set a sink to use OpenSearch as shown above using
number_of_shards: N - Restart the service
Expected behavior
Templates should be created using the right sharding number.
Environment (please complete the following information):
- Amazon OpenSearch service
- Version [2.11]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the OpenSearch sink configuration and the template-creation path, using the reproduction configuration with number_of_shards set. Reproduce the index-template error against OpenSearch 2.11, then verify that templates are created successfully with the requested shard count.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100