[ https://issues.apache.org/jira/browse/KAFKA-8235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16818442#comment-16818442 ]
Matthias J. Sax commented on KAFKA-8235: ---------------------------------------- Thanks for reporting this. I have issue to map theĀ stack trace to the code. at org.apache.kafka.streams.state.internals.InMemoryTimeOrderedKeyValueBuffer.restoreBatch(InMemoryTimeOrderedKeyValueBuffer.java:288) The methodĀ private void restoreBatch(final Collection<ConsumerRecord<byte[], byte[]>> batch) seems to be in a different line... and I can also not find where TreeMap.firstKey is called. Kafka 2.3 is not released yet, thus "affected version" field seems not be correctly specified. What version are you using? > NoSuchElementException when restoring state after a clean shutdown of a Kafka > Streams application > ------------------------------------------------------------------------------------------------- > > Key: KAFKA-8235 > URL: https://issues.apache.org/jira/browse/KAFKA-8235 > Project: Kafka > Issue Type: Bug > Affects Versions: 2.3.0 > Environment: Linux, CentOS 7, Java 1.8.0_191, 50 partitions per > topic, replication factor 3 > Reporter: Andrew Klopper > Priority: Major > > While performing a larger scale test of a new Kafka Streams application that > performs aggregation and suppression, we have discovered that we are unable > to restart the application after a clean shutdown. The error that is logged > is: > {code:java} > [rollupd-5ee1997b-8302-4e88-b3db-a74c8b805a6c-StreamThread-1] ERROR > org.apache.kafka.streams.processor.internals.StreamThread - stream-thread > [rollupd-5ee1997b-8302-4e88-b3db-a74c8b805a6c-StreamThread-1] Encountered the > following error during processing: > java.util.NoSuchElementException > at java.util.TreeMap.key(TreeMap.java:1327) > at java.util.TreeMap.firstKey(TreeMap.java:290) > at > org.apache.kafka.streams.state.internals.InMemoryTimeOrderedKeyValueBuffer.restoreBatch(InMemoryTimeOrderedKeyValueBuffer.java:288) > at > org.apache.kafka.streams.processor.internals.CompositeRestoreListener.restoreBatch(CompositeRestoreListener.java:89) > at > org.apache.kafka.streams.processor.internals.StateRestorer.restore(StateRestorer.java:92) > at > org.apache.kafka.streams.processor.internals.StoreChangelogReader.processNext(StoreChangelogReader.java:317) > at > org.apache.kafka.streams.processor.internals.StoreChangelogReader.restore(StoreChangelogReader.java:92) > at > org.apache.kafka.streams.processor.internals.TaskManager.updateNewAndRestoringTasks(TaskManager.java:328) > at > org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:866) > at > org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:804) > at > org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:773) > {code} > The issue doesn't seem to occur for small amounts of data, but it doesn't > take a particularly large amount of data to trigger the problem either. > Any assistance would be greatly appreciated. -- This message was sent by Atlassian JIRA (v7.6.3#76005)