KAFKA-6958: Overload methods for group and windowed stream to allow to name operation name using the new Named class#6413
Conversation
c1e25ea to
7d40dab
Compare
bbejeck
left a comment
There was a problem hiding this comment.
Made a pass over SessionedXX TimeWindowed and aggregate builders. Just one minor comment otherwise looks reasonable.
|
@fhussonnois please rebase this PR |
|
ping @vvcephei @ableegoldman for reviews |
67b0a21 to
0adbcf5
Compare
|
@fhussonnois #6412 is merged now, can you rebase this PR and ping us when it's ready for review? |
0adbcf5 to
012b883
Compare
|
@bbejeck This PR has been rebase (sorry I just remember I've forgotten to ping you) thank you |
@fhussonnois no worries! Thanks for the rebase, I'll make a pass on this last PR soon |
|
retest this please |
|
@fhussonnois the build failures are related, the changes need to go into the scala API as well - |
dee0868 to
211f656
Compare
|
Java 8 and Java 11 Scala 2.12 failed with Java 11 2.13 failed with retest this please |
|
Test results already removed. retest this please |
bbejeck
left a comment
There was a problem hiding this comment.
@fhussonnois thanks for your persistence on KIP-307! I've made a pass over this final PR and overall it looks good, I only have minor comments.
There was a problem hiding this comment.
shouldn't the table-source suffix go with the sourceName?
There was a problem hiding this comment.
@bbejeck, Yes, that seems more logical. I made the modification for the global table too. Also, I think the suffix "-source" is sufficient.
There was a problem hiding this comment.
should this have a suffix at all? I don't think the funcName requires one.
If it does, at a minimum we should not use -sink as it's used above and doesn't accurately describe its role.
There was a problem hiding this comment.
@bbejeck ,You're right, it seems OK to remove the suffix from the function name. The user should ensure that a unique name is given to each node. So, I've removed the suffix and I also add a unit test.
|
Java 11, Scala 2.12 failed, Java 8 and Java 11 Scala 2.11 passed, test results already cleaned up. retest this please |
0db594f to
78e1950
Compare
bbejeck
left a comment
There was a problem hiding this comment.
Thanks for the update @fhussonnois LGTM.
|
Java 8/2.11 and Java 11/2.13 failed retest this please |
|
ping @guozhangwang, @mjsax, @vvcephei, @ableegoldman, @cadonna, @abbccdda |
vvcephei
left a comment
There was a problem hiding this comment.
Hey @fhussonnois , thanks for this latest edition in the ongoing saga of adding Named :)
This pretty much looks good to me, I just had a few comments and questions.
The big concern is the Scala DSL. It seems like this is actually a significant problem.
Thanks,
-John
There was a problem hiding this comment.
Would this result in a different name for the source than the prior code? (Not sure if it matters...)
There was a problem hiding this comment.
Hey @fhussonnois or @bbejeck , what do you think about this?
There was a problem hiding this comment.
did you want to add a null check for this as well (like you did for aggregate)?
There was a problem hiding this comment.
Were these changes necessary to disambiguate the methods? It would be important to know, because it would constitute an API-breaking change in the Scala DSL.
There was a problem hiding this comment.
Ok, I've just confirmed that this is a breaking change in the Scala DSL. I'm not sure why but introducing the KGroupedStream#aggregate(Initializer, Aggregator, Named) method creates ambiguity about how the type system should infer the generic parameters to Materialized here.
This also resolves the ambiguity:
val stream2: KStreamJ[String, Integer] = mappedStream.groupByKey
.aggregate(initializer, aggregator, MaterializedJ.`with`(Serdes.String, SerdesJ.Integer): MaterializedJ[String, Integer, KeyValueStore[Bytes, Array[Byte]]])
.toStreamEither way, it's a breaking change, which we should probably not merge.
One simple fix is simply not to add that particular overload. The full expression with Named and Materialized would still be present.
There was a problem hiding this comment.
It seems weird that these changed. Is that expected and ok?
There was a problem hiding this comment.
Hey @fhussonnois or @bbejeck , what do you think about this?
|
@fhussonnois regarding the overloads The KIP will need to get updated with this information as well. |
…o name operation name using the new Named class Sub-task required to allow to define custom processor names with KStreams DSL(KIP-307) : - overload method for KGroupedStream to accept a Named parameter - overload method for KGroupedTable to accept a Named parameter - overload method for TimeWindowedKStream to accept a Named parameter - overload method for SessionWindowedKStream to accept a Named parameter
78e1950 to
ccdf00c
Compare
|
Java 8/2.11, and Java 11/2.13 passed retest this please |
|
Java 11/2.13 failed, test results already gone retest this please |
vvcephei
left a comment
There was a problem hiding this comment.
This LGTM now. I had one unanswered question, but I don't think we need to block on it. We can always do a follow-up patch if it's important.
Thanks so much @fhussonnois , for all your work on this!
There was a problem hiding this comment.
Hey @fhussonnois or @bbejeck , what do you think about this?
There was a problem hiding this comment.
Hey @fhussonnois or @bbejeck , what do you think about this?
|
Merged #6413 into trunk. |
|
Thanks for all the hard work @fhussonnois !! |
|
Thank you very much @bbejeck for you help on that KIP. |
|
Congrats @fhussonnois! Great work! |
Conflicts: * .gitignore: addition of clients/src/generated-test was near local additions for support-metrics. * checkstyle/suppressions.xml: upstream refactoring of exclusions for generator were near the local changes for support-metrics. * gradle.properties: scala version bump caused a minor conflict due to the kafka version change locally. gradle/dependencies.gradle: bcpkix version bump was near avro additions in the local version. * apache-github/trunk: (49 commits) KAFKA-8471: Replace control requests/responses with automated protocol (apache#7353) MINOR: Don't generate unnecessary strings for debug logging in FetchSessionHandler (apache#7394) MINOR:fixed typo and removed outdated varilable name (apache#7402) KAFKA-8934: Create version file during build for Streams (apache#7397) KAFKA-8319: Make KafkaStreamsTest a non-integration test class (apache#7382) KAFKA-6883: Add toUpperCase support to sasl.kerberos.principal.to.local rule (KIP-309) KAFKA-8907; Return topic configs in CreateTopics response (KIP-525) (apache#7380) MINOR: Address review comments for KIP-504 authorizer changes (apache#7379) MINOR: add versioning to request and response headers (apache#7372) KAFKA-7273: Extend Connect Converter to support headers (apache#6362) MINOR: improve the Kafka RPC code generator (apache#7340) MINOR: Improve the org.apache.kafka.common.protocol code (apache#7344) KAFKA-8880: Docs on upgrade-guide (apache#7385) KAFKA-8179: do not suspend standby tasks during rebalance (apache#7321) KAFKA-8580: Compute RocksDB metrics (apache#7263) KAFKA-8880: Add overloaded function of Consumer.committed (apache#7304) HOTFIX: fix Kafka Streams upgrade note for broker backward compatibility (apache#7363) KAFKA-8848; Update system tests to use new AclAuthorizer (apache#7374) MINOR: remove unnecessary null check (apache#7299) KAFKA-6958: Overload methods for group and windowed stream to allow to name operation name using the new Named class (apache#6413) ...
Hi @mjsax @bbejeck
This is the last PR for the KIP-307.
NOTE : PR 6412 should be merge first
Thanks a lot for the review.