You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Bill Bejeck (JIRA)" <ji...@apache.org> on 2018/10/27 23:37:00 UTC

[jira] [Commented] (KAFKA-7552) StatefulProcessorNode tries to connect state store to processor before it is added

    [ https://issues.apache.org/jira/browse/KAFKA-7552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16666242#comment-16666242 ] 

Bill Bejeck commented on KAFKA-7552:
------------------------------------

Adam thanks for raising the issue.

This situation is fixed with the PR [https://github.com/apache/kafka/pull/5740.], so I'm going to close this ticket as resolved.

To give you some context a StatefulProcessorNode can be created in two cases
 # KStream#transformXX, KStream#process operations can use state stores.  However, the stores need to have been created ahead of time.  In this case, the StatefulProcessorNode needs to have just name passed in for the previously registered store.
 # When an aggregation is performed the store needs to be built and registered as part of building this node.

So these two should be mutually exclusive if the name of the store is provided, we know the usage is from

a pre-registered store and if the store builder is provided we need to register the store for the processor.

The code in the org.apache.kafka.streams.kstream.internals.graph was not available until the upcoming 2.1 release.  The classes in this package are for internal use in building an intermediate representation of a Kafka Streams application and allow for performing optimizations.

 

Let me know if you have any more questions.

 

Thanks,

Bill

> StatefulProcessorNode tries to connect state store to processor before it is added
> ----------------------------------------------------------------------------------
>
>                 Key: KAFKA-7552
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7552
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 2.0.0, 2.1.0
>            Reporter: Adam Bellemare
>            Priority: Minor
>
> StatefulProcessorNode tries to "connectProcessorAndStateStores" before "addStateStore" is called on the state store. This throws an exception. Current implementations of Kafka Streams do not appear to test for this, nor do any of the kafka streams applications use it. Discovered while looking to use the node for another ticket.
> [https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/kstream/internals/graph/StatefulProcessorNode.java#L86]
>  
> Results in "org.apache.kafka.streams.errors.TopologyException: Invalid topology: StateStore <statestore-name> is not added yet."



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)