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

[Issue 13019][es-sink] Support event-time-based index name in ES Sink #14383

Merged
merged 7 commits into from
Feb 28, 2022

Conversation

fantapsody
Copy link
Contributor

@fantapsody fantapsody commented Feb 19, 2022

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

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes / no)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)
  • The rest endpoints: (yes / no)
  • The admin cli options: (yes / no)
  • Anything that affects deployment: (yes / no / don't know)

Documentation

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)

@github-actions
Copy link

@fantapsody:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@github-actions
Copy link

@fantapsody:Thanks for providing doc info!

@github-actions github-actions bot added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc-label-missing labels Feb 21, 2022
@Anonymitaet
Copy link
Member

Discussed w/ @fantapsody

  1. @fantapsody will add docs to Elasticsearch sink connector - configuration table

image

  1. @fantapsody suggests generating configuration tables automatically rather than updating them manually. I've discussed w/ @urfreespace, found it is workable, and recorded an issue here.

@codelipenghui codelipenghui added this to the 2.11.0 milestone Feb 23, 2022
@fantapsody fantapsody marked this pull request as ready for review February 28, 2022 00:34
@fantapsody
Copy link
Contributor Author

@eolivelli @freeznet @nlu90 @tuteng Could you please take a look?

@tuteng tuteng added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Feb 28, 2022
@tuteng tuteng merged commit 21c3a0b into apache:master Feb 28, 2022
@@ -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`. |
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PTAL #14517

@codelipenghui codelipenghui added this to the 2.10.0 milestone Mar 9, 2022
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
…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*
@nicoloboschi
Copy link
Contributor

@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
I don't see it in the 2.10 release notes so there's no confusion for users. https://pulsar.apache.org/release-notes/#2100

nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Apr 28, 2022
…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)
codelipenghui pushed a commit that referenced this pull request Apr 29, 2022
…#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)
@codelipenghui codelipenghui modified the milestones: 2.10.0, 2.11.0 Apr 29, 2022
@nodece nodece mentioned this pull request May 6, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connector cherry-picked/branch-2.10 doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. release/2.10.1 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pulsar-io-elasticsearch-sink support rolling create index
7 participants