为什么在重启时不填写带有内存键值存储的GlobalKTable? [英] Why would GlobalKTable with in-memory key-value store not be filled out at restart?

查看:62
本文介绍了为什么在重启时不填写带有内存键值存储的GlobalKTable?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图弄清楚GlobalKTable的工作方式,并注意到我的内存键值存储区未填充,以防重新启动.但是,文档听起来似乎已经装满,以防万一重启,因为所有数据在客户端上都是重复的.

I am trying to figure out how GlobalKTable is working and noticed that my in memory key value store is not filled in case a restart. However the documentation sounds that it is filled in case a restart since the whole data is duplicated on clients.

当我调试应用程序时,看到/tmp/kafka-streams/category-client-1/global/.checkpoint上有一个文件,其中包含有关我的主题的偏移量.这对于持久存储数据并改善重新启动的存储可能是必需的,但是由于此文件中存在偏移,因此我的应用程序跳过了恢复其状态的操作.

When I debug my application see that there is a file on /tmp/kafka-streams/category-client-1/global/.checkpoint and it is including an offset about my topic. This might be maybe necessary for stores which are persisting their data and improve restarts however since there is an offset in this file, my application skips restoring its state.

如何确定每次重新启动或重新启动都包含主题的全部数据?

How can I be sure that each restart or fresh start includes whole data of my topic?

推荐答案

因为您使用的是内存存储,所以我假设您遇到了此错误:

Because you are using in-memory store I assume that you are hitting this bug: https://issues.apache.org/jira/browse/KAFKA-6711

作为一种解决方法,您可以删除全局存储的本地检查点文件-这将在重新启动时触发引导.或者,您切换回默认的RocksDB存储.

As a workaround, you can delete the local checkpoint file for the global store -- this will trigger the bootstrapping on restart. Or you switch back to default RocksDB store.

这篇关于为什么在重启时不填写带有内存键值存储的GlobalKTable?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆