简体   繁体   English

强制 RocksDB 支持的 Samza 键/值存储从 kafka 更改日志重新加载?

[英]Force Samza key/value store backed by RocksDB to reload from kafka changelog?

In order to debug a production problem, I am running Samza code locally using ProcessJobFactory.为了调试生产问题,我使用 ProcessJobFactory 在本地运行 Samza 代码。 Everything appears to run fine.一切似乎都运行良好。

The code uses a Samza key/value store backed by RocksDB and Kafka as a changelog (Kafka running on a different machine in case that matters).该代码使用由 RocksDB 和 Kafka 支持的 Samza 键/值存储作为变更日志(Kafka 在不同的机器上运行,以防万一)。

In order to populate the environment with real data to debug, I replayed live data into the Kafka changelog for the key/value store for the RocksDB database with the Samza job stopped.为了用真实数据填充环境进行调试,我将实时数据重放到 Kafka 更改日志中,用于 RocksDB 数据库的键/值存储,而 Samza 作业已停止。

Upon starting Samza, it does not resync the RocksDB database with the Kafka changelog.在启动Samza,它不会重新同步与卡夫卡的changelog的RocksDB数据库。 I verified this using Keylord (tool) and looking at the contents of the RocksDB database directly.我使用 Keylord(工具)并直接查看 RocksDB 数据库的内容进行了验证。

How can Samza be forced to resync the RocksDB database (key/value store) with the changelog? Samza 如何强制重新同步 RocksDB 数据库(键/值存储)与更改日志? Is there a config setting or a code level call that can be made?是否可以进行配置设置或代码级调用?

Related - I assume when the code does a key-value-store.all();相关 - 我假设代码何时执行 key-value-store.all(); that even if the cache in the code is empty, it will go to RocksDB and pull "all entries" from there?即使代码中的缓存为空,它也会转到 RocksDB 并从那里提取“所有条目”?

Thanks,谢谢,

Have you tried deleting the store directory where the samza job hosts its RocksDB stores?您是否尝试删除 samza 作业托管其 RocksDB 存储的存储目录? It'd be under the job.logged.store.base.dir you have configured https://samza.apache.org/learn/documentation/latest/jobs/configuration-table.html , defaulting to user.dir environment property它会在您配置的 job.logged.store.base.dir 下https://samza.apache.org/learn/documentation/latest/jobs/configuration-table.html ,默认为 user.dir 环境属性

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM