You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Matthias J. Sax (JIRA)" <ji...@apache.org> on 2018/01/30 01:48:02 UTC

[jira] [Commented] (KAFKA-5824) Cannot write to key value store provided by ProcessorTopologyTestDriver

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

Matthias J. Sax commented on KAFKA-5824:
----------------------------------------

[~dminkovsky] KIP-247 was merged today (KAFKA-3625). Does this resolve this ticket? Would be great if you could verify so can either close this ticket or address any gaps. Thanks a lot!

> Cannot write to key value store provided by ProcessorTopologyTestDriver
> -----------------------------------------------------------------------
>
>                 Key: KAFKA-5824
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5824
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 0.11.0.0
>            Reporter: Dmitry Minkovsky
>            Priority: Major
>
> I am trying to `put()` to a KeyValueStore that I got from ProcessorTopologyTestDriver#getKeyValueStore() as part of setup for a test. The JavaDoc endorses this use-case:
>      * This is often useful in test cases to pre-populate the store before the test case instructs the topology to
>      * {@link #process(String, byte[], byte[]) process an input message}, and/or to check the store afterward.
> However, the `put()` results in the following error: 
> {{
> java.lang.IllegalStateException: This should not happen as offset() should only be called while a record is processed
> 	at org.apache.kafka.streams.processor.internals.AbstractProcessorContext.offset(AbstractProcessorContext.java:139)
> 	at org.apache.kafka.streams.state.internals.CachingKeyValueStore.put(CachingKeyValueStore.java:193)
> 	at org.apache.kafka.streams.state.internals.CachingKeyValueStore.put(CachingKeyValueStore.java:188)
> 	at pony.UserEntityTopologySupplierTest.confirm-settings-requests(UserEntityTopologySupplierTest.groovy:81)
> }}
> This error seems straightforward: I am not doing the `put` within the context of stream processing. How do I reconcile this with the fact that I am trying to populate the store for a test, which the JavaDoc endorses?
> Thank you,
> Dmitry



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