Dmitry Minkovsky created KAFKA-5824:
---------------------------------------
Summary: 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
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
(v6.4.14#64029)