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

[jira] [Resolved] (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:all-tabpanel ]

Matthias J. Sax resolved KAFKA-5824.
------------------------------------
    Resolution: Won't Fix

Resolving this, because `ProcessorTopologyTestDriver` is an internal class and we now offer public test-util package with class `TopologyTestDriver` that should be used instead.
 

> 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)