Kafka Streams的状态存储抛出FileNotFoundException

时间:2019-08-23 07:57:18

标签: apache-kafka apache-kafka-streams

重新启动Kubernetes集群中的Pod后(/ tmp位置是其默认值),我在Kafka Streams(版本:2.0.1,应用程序实例数:9)中遇到以下异常:

java.io.FileNotFoundException: /tmp/kafka-streams/state_store_name/0_13/.checkpoint.tmp (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at org.apache.kafka.streams.state.internals.OffsetCheckpoint.write(OffsetCheckpoint.java:78)
at org.apache.kafka.streams.processor.internals.ProcessorStateManager.checkpoint(ProcessorStateManager.java:315)
at org.apache.kafka.streams.processor.internals.StreamTask.commit(StreamTask.java:397)
at org.apache.kafka.streams.processor.internals.StreamTask.commit(StreamTask.java:382)
at org.apache.kafka.streams.processor.internals.AssignedTasks$1.apply(AssignedTasks.java:67)
at org.apache.kafka.streams.processor.internals.AssignedTasks.applyToRunningTasks(AssignedTasks.java:362)
at org.apache.kafka.streams.processor.internals.AssignedTasks.commit(AssignedTasks.java:352)
at org.apache.kafka.streams.processor.internals.TaskManager.commitAll(TaskManager.java:401)
at org.apache.kafka.streams.processor.internals.StreamThread.maybeCommit(StreamThread.java:1042)
at org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:845)
at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:767)
at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:736)

此问题在Ticket中被提及为错误,并标记为已解决。但是,还没有公开的发行版本。一种可能的选择是从2.0.1升级到2.2.2。

我还尝试了其他一些选择,而不是进行升级,以克服注释中提到的此问题,但这没有帮助。这些操作将state.cleanup.delay.ms的值从默认的10分钟增加到30分钟,以及在KafkaStreams.cleanUp()之前调用KafkaStreams.start()

在升级版本之前是否可以尝试一下?新版本何时发布?

0 个答案:

没有答案