KAFKA-8863 - Add InsertHeader and DropHeader transforms for connect#7284
KAFKA-8863 - Add InsertHeader and DropHeader transforms for connect#7284alozano3 wants to merge 24 commits intoapache:trunkfrom
Conversation
|
Inside the method consumeNextToken() of the Values class, the string being parsed is tokenized by the character ":". So when I insert a header of the type Time with the pattern "HH:mm:ss.SSS'Z'" the string gets tokenized instead of remaining as a whole. The consequence is that the string is treated as different integer values and is never parsed as a whole date inside the method parse(Parser parser, boolean embedded). As a workaround I insert the value escaped (e.g: "14\\:34\\:22.222Z"), and then I replace the characters "\" by "", because in order to be aprsed as adate, the length of the string is checked. Could you give some advice on this please?? |
|
retest this please |
1 similar comment
|
retest this please |
|
There is a flaky test org.apache.kafka.trogdor.coordinator.CoordinatorTest.testTaskRequestWithOldStartMsGetsUpdated
|
|
Another flaky test:
|
|
retest this please |
|
@rhauch for review. |
|
Should I just insert only string schema to the header instead of trying to parse the value in order to set the proper schema?? |
…sforms/DropHeaders.java Co-Authored-By: Randall Hauch <rhauch@gmail.com>
…sforms/DropHeaders.java Co-Authored-By: Randall Hauch <rhauch@gmail.com>
|
@rhauch What do you think about the issue with the Time and Timestamp values that I previously posted? |
…8863-connect-insertHeaders-dropHeaders
|
Retest this, please. |
…sforms/InsertHeader.java Co-Authored-By: Randall Hauch <rhauch@gmail.com>
…sforms/InsertHeader.java Co-Authored-By: Randall Hauch <rhauch@gmail.com>
…sforms/InsertHeader.java Co-Authored-By: Randall Hauch <rhauch@gmail.com>
|
@alozano3 any update to my questions/comments? |
|
Sure! I have implemented and answered some of your advices but I didn't have much time yesterday to have it all. Hopefully next week, I will go for it. |
|
@alozano3 we're getting close to code freeze, so the sooner the better. |
…8863-connect-insertHeaders-dropHeaders
rhauch
left a comment
There was a problem hiding this comment.
Thanks for the PR, @alozano3. The SMT implementations look pretty good, but unfortunately any changes to ConfigDef will require a KIP. My recommendation is to avoid making any changes to ConfigDef and keep the validator implementation specific to these SMTs.
|
Any update? |
The change is done. Please review the changes. |
…8863-connect-insertHeaders-dropHeaders
…8863-connect-insertHeaders-dropHeaders
|
I close this PR because #9549 has been merged. |
The SMTs InsertHeader and DropHeaders described in KIP-145 have been implemented, extending the work done in PR4319.
Unit tests are added for InsertHeader and ConnectHeaders, covering the different types of Header (int8, int16, int32, int64, float32, float64, Time, Date and Timestamp).
Committer Checklist (excluded from commit message)