[ https://issues.apache.org/jira/browse/KAFKA-18191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17926636#comment-17926636 ]
A. Sophie Blee-Goldman commented on KAFKA-18191: ------------------------------------------------ ah, I see the problem. I didn't notice the StreamJoined#withName, so that's on me. However what threw me off is, imo, a legitimate issue...maybe not a bug but definitely a gap. For pretty much every operator that has a config class like StreamJoined, the processor name can be specified via a static `ConfigClass#as` method. When I saw that StreamJoined had an #as method I just assumed it worked like everything else and set the processor name, but this is actually the store name. So problem #1 is that the API is misleading Problem 2 is that, AFAICT, there is no way to set just the processor name – there's no static constructor like #as. It's honestly not a huge problem and perhaps not even worth fixing now, but I wish we had followed the established pattern for StreamJoined#as to specify the processor name. We could add a static constructor for the processor name to solve Problem #2 but imo Problem 1 is the bigger deal – it's not much to just require users to specify the store name first in order to use #withName to set the processor name, but I'm willing to bet there are users out there who (like me) never realized that StreamJoined#as isn't setting the processor name and could be in for a nasty surprise if they try to upgrade a topology I guess that's where Sebastien's KIP comes in :) Thoughts? > StreamJoined name is not used for processor names > ------------------------------------------------- > > Key: KAFKA-18191 > URL: https://issues.apache.org/jira/browse/KAFKA-18191 > Project: Kafka > Issue Type: Bug > Components: streams > Reporter: A. Sophie Blee-Goldman > Priority: Major > > The StreamJoined#as API allows you to set a name for a stream-stream join > operator. The intention is to allow one to name the stores, and therefore > changelogs, resulting in an upgradeable topology, but it is a bit strange > that the name isn't also used for the processors themselves. > Of course, the stream-stream join is a bit of an edge case compared to, say, > a count or filter operator, where the operator is a 1:1 mapping to the > processor node and the user can name the processor exactly, because the > stream-stream join operator actually results in multiple processors which > each need a unique name. However, we could at least use the specified > StreamJoined name as the basis for the resulting processor names, to avoid > getting stuck with names like "KSTREAM-JOINTHIS-0000000004" and > "KSTREAM-WINDOWED-0000000003" which are difficult to interpret and make it > hard to read a topology > Note that there is some existing precedent for this: for example with > cogroups, the individual processors inherit the base name of the cogroup's > aggregate operator name. For example this code > > {code:java} > grouped1 > .cogroup((k, v, a) -> a + v) // wrapped 1 > .cogroup(grouped2, (k, v, a) -> a + v) // wrapped 2 > .aggregate(() -> "", Named.as("myName"), Materialized.as("store")) {code} > > produces processors with these names: "myName-cogroup-agg-0", > "myName-cogroup-agg-1", "myName-cogroup-merge" -- This message was sent by Atlassian Jira (v8.20.10#820010)