KAFKA-5146 / move kafka-streams example to a new module#10131
KAFKA-5146 / move kafka-streams example to a new module#10131mjsax merged 1 commit intoapache:trunkfrom
Conversation
0681b34 to
e568571
Compare
e568571 to
cae4e15
Compare
ableegoldman
left a comment
There was a problem hiding this comment.
LGTM, thanks for the PR!
There was a problem hiding this comment.
I think we should include the new streams-examples module in testAll goal.
There was a problem hiding this comment.
Just curious. Why do we need this?
There was a problem hiding this comment.
This will break users who were relying on the transitive dependency. We may want to add a note to the release notes.
There was a problem hiding this comment.
We move the sub-module stream/examples into it's own module streams-examples. I would be weird to only name it examples as there is not parent streams reference any longer.
There was a problem hiding this comment.
Is there an advantage in having it as a top level module instead?
There was a problem hiding this comment.
As describe on the Jira, the goal is to get rid of the dependency of stream model on connect module. It's ok for streams-examples to depend on connect, but for streams is cleaner to not have it, and the dependency is only there to pull in stuff for the examples.
There was a problem hiding this comment.
That seems independent of whether it's a submodule or not.
There was a problem hiding this comment.
Interesting. \cc @ableegoldman
I actually just tried to only remove the connect dependency from streams module (and add the Jackson dependency we need fo StateDirectory.java) and it seems to work.
So maybe we can just keep sub-module :streams:examples as-is?
There was a problem hiding this comment.
Huh, maybe we're not even using connect in the examples to begin with (or at least, not anymore)? That actually doesn't sound too surprising, I've never seen Connect being used in any streams stuff I've looked at
That seems independent of whether it's a submodule or not
@ijuma WDYM? If the examples are a submodule of streams, and the examples depend on connect, then doesn't that mean the streams module will pull in connect? Even if we may turn out not to depend on connect to begin with...)
There was a problem hiding this comment.
@ableegoldman No. I removed the connect-json dependency from streams and left it in streams:examples and the dependency is gone from the streams module:
compileClasspath - Compile classpath for source set 'main'.
+--- project :clients
+--- org.slf4j:slf4j-api:1.7.30
+--- org.rocksdb:rocksdbjni:5.18.4
+--- com.fasterxml.jackson.core:jackson-annotations:2.10.5
--- com.fasterxml.jackson.core:jackson-databind:2.10.5.1
+--- com.fasterxml.jackson.core:jackson-annotations:2.10.5
--- com.fasterxml.jackson.core:jackson-core:2.10.5
There was a problem hiding this comment.
I think that's all you need to do.
There was a problem hiding this comment.
Sounds good. I will send a PR later this week fixing it to be as discussed here then. Probably even tonight (CET).
cae4e15 to
75879da
Compare
There was a problem hiding this comment.
"implementation libs.jacksonDatabind" is already being added to compileClassPath in streams module.
Thus it seems that indeed there's no need to add compile dependency of libs.jacksonDatabind to streams module. Please let me know if this is not the case.
There was a problem hiding this comment.
SGTM.
Back in the days, KafkaStreams did not use anything JSON related, but in a later version we actually added this dependency.
There was a problem hiding this comment.
compile is deprecated, you have to choose between api and implementation.
There was a problem hiding this comment.
@ijuma well noted! I have updated the PR. Since there are many "compile" references in build.gradle, I will have a look later on JIRA if there is already a ticket to update all this to api or implementation and raise if not.
There was a problem hiding this comment.
having a better look, seems that no ticket is required. They are compileOnly or testCompileOnly which are not deprecated. All good.
75879da to
c2cb194
Compare
c2cb194 to
8c439e7
Compare
|
@MarcoLotz Overall LGTM -- but as mentioned by @ijuma (cf #10131 (comment)) we should add a comment to the upgrade note (ie, in |
0e50a83 to
cb3be19
Compare
|
Thank you for pointing the directions @mjsax. Updated those files. Since it's not API related, I've used another paragraph on streams/upgrade-guide.html |
215b74a to
bae4795
Compare
mjsax
left a comment
There was a problem hiding this comment.
Sorry the delay -- and thanks for updating the docs! Overall LGTM.
Seems there is some conflict -- can you rebase so we can merge this PR?
bae4795 to
dd605f7
Compare
|
Thanks for the PR @MarcoLotz |
* apache-github/trunk: KAFKA-10769 Remove JoinGroupRequest#containsValidPattern as it is dup… (apache#9851) KAFKA-12384: stabilize ListOffsetsRequestTest#testResponseIncludesLeaderEpoch (apache#10389) KAFKA-5146: remove Connect dependency from Streams module (apache#10131)
Moved "streams-examples" to its own module outside kafka-streams module.
Because of org.apache.kafka.streams.processor.internals.StateDirectory in kafka-streams module, I had to add the jackson binder dependency. Before the change, It was probably being retrieved as a transitive dependency through "connect-json" dependency.
Committer Checklist (excluded from commit message)