-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Issue 13019][es-sink] Support event-time-based index name in ES Sink #14383
Conversation
@fantapsody:Thanks for your contribution. For this PR, do we need to update docs? |
@fantapsody:Thanks for providing doc info! |
...-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/ElasticSearchConfig.java
Outdated
Show resolved
Hide resolved
...r-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/IndexNameFormatter.java
Outdated
Show resolved
Hide resolved
Discussed w/ @fantapsody
|
Co-authored-by: Anonymitaet <50226895+Anonymitaet@users.noreply.github.com>
@eolivelli @freeznet @nlu90 @tuteng Could you please take a look? |
@@ -50,7 +50,7 @@ The configuration of the Elasticsearch sink connector has the following properti | |||
| Name | Type|Required | Default | Description | |||
|------|----------|----------|---------|-------------| | |||
| `elasticSearchUrl` | String| true |" " (empty string)| The URL of elastic search cluster to which the connector connects. | | |||
| `indexName` | String| true |" " (empty string)| The index name to which the connector writes messages. | | |||
| `indexName` | String| true |" " (empty string)| The index name to which the connector writes messages. The default value is the topic name. It accepts date formats in the name to support event time based index with the pattern `%{+<date-format>}`. For example, suppose the event time of the record is 1645182000000L, the indexName is `logs-%{+yyyy-MM-dd}`, then the formatted index name would be `logs-2022-02-18`. | |
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.
Hi @fantapsody the docs should be added to site2/docs/io-elasticsearch-sink.md
as well.
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.
PTAL #14517
…apache#14383) Fixes apache#13019 ### Motivation As described in the original issue, it's a common request to write data to event-time-based indices in logs and metrics use cases, therefore it would be very helpful to have builtin support in the ES sink. ### Modifications *Describe the modifications you've done.* ### Verifying this change - [ ] Make sure that the change passes the CI checks. This change added tests and can be verified as follows: - *Added test cases for index name formatter*
@tuteng @fantapsody @codelipenghui this pull is not present in Pulsar 2.10. I believe it has not been cherry-picked to branch-2.10 at all |
…apache#14383) Fixes apache#13019 ### Motivation As described in the original issue, it's a common request to write data to event-time-based indices in logs and metrics use cases, therefore it would be very helpful to have builtin support in the ES sink. ### Modifications *Describe the modifications you've done.* ### Verifying this change - [ ] Make sure that the change passes the CI checks. This change added tests and can be verified as follows: - *Added test cases for index name formatter* (cherry picked from commit 21c3a0b)
…#14383) Fixes #13019 ### Motivation As described in the original issue, it's a common request to write data to event-time-based indices in logs and metrics use cases, therefore it would be very helpful to have builtin support in the ES sink. ### Modifications *Describe the modifications you've done.* ### Verifying this change - [ ] Make sure that the change passes the CI checks. This change added tests and can be verified as follows: - *Added test cases for index name formatter* (cherry picked from commit 21c3a0b)
Fixes #13019
Motivation
As described in the original issue, it's a common request to write data to event-time-based indices in logs and metrics use cases, therefore it would be very helpful to have builtin support in the ES sink.
Modifications
Describe the modifications you've done.
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
Check the box below or label this PR directly (if you have committer privilege).
Need to update docs?
doc-required
(If you need help on updating docs, create a doc issue)
no-need-doc
(Please explain why)
doc
(If this PR contains doc changes)