[WIP] Add KIP-145 HeaderTo and HeaderFrom transforms for Connect#7801
[WIP] Add KIP-145 HeaderTo and HeaderFrom transforms for Connect#7801flojon wants to merge 7 commits intoapache:trunkfrom
Conversation
alozano3
left a comment
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
I think you should validate that the fields and headers properties contain the same number of literals.
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
I think you should validate that the fields and headers properties contain the same number of literals.
|
This PR is being marked as stale since it has not had any activity in 90 days. If you 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. |
|
This PR has been closed since it has not had any activity in 120 days. If you feel like this |
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)