Skip to content

[WIP] Add KIP-145 HeaderTo and HeaderFrom transforms for Connect#7801

Closed
flojon wants to merge 7 commits intoapache:trunkfrom
flojon:kafka-connect-transformations
Closed

[WIP] Add KIP-145 HeaderTo and HeaderFrom transforms for Connect#7801
flojon wants to merge 7 commits intoapache:trunkfrom
flojon:kafka-connect-transformations

Conversation

@flojon
Copy link
Copy Markdown

@flojon flojon commented Dec 9, 2019

Implements the SMTs HeaderTo and HeaderFrom described in KIP-145.
Extends #4319 and complements #7284.

Since we're not using schemas in our project that code is untested. Will try to add some tests unless somebody feels like contributing.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

Copy link
Copy Markdown
Contributor

@alozano3 alozano3 left a comment

Choose a reason for hiding this comment

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

It's great that you have decided implement these transforms. I haven't been able to test the code but I have taken a look at the code and I have made a little suggestion.


Headers updatedHeaders = new ConnectHeaders(record.headers());

int length = Math.min(headersConfig.size(), fieldsConfig.size());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you should validate that the fields and headers properties contain the same number of literals.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sorry for not getting back earlier! Should I throw some exception in case of mismatch? Or is there a proper place to do this kind of validation?


Headers updatedHeaders = new ConnectHeaders(record.headers());

int length = Math.min(headersConfig.size(), fieldsConfig.size());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you should validate that the fields and headers properties contain the same number of literals.

@github-actions
Copy link
Copy Markdown

This PR is being marked as stale since it has not had any activity in 90 days. If you
would like to keep this PR alive, please leave a comment asking for a review. If the PR has
merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact).

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

@github-actions github-actions Bot added the stale Stale PRs label Nov 22, 2024
@github-actions
Copy link
Copy Markdown

This PR has been closed since it has not had any activity in 120 days. If you feel like this
was a mistake, or you would like to continue working on it, please feel free to re-open the
PR and ask for a review.

@github-actions github-actions Bot added the closed-stale PRs that were closed due to inactivity label Dec 23, 2024
@github-actions github-actions Bot closed this Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

closed-stale PRs that were closed due to inactivity connect stale Stale PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants