Clickhouse在模式文件中找不到原始消息

发布于 2025-02-12 04:59:47 字数 689 浏览 2 评论 0 原文

我们有一个2个Clickhouse节点的群集。我们将其用于从Kafka流式传输,因此我们使用Kafka发动机桌。数据格式为 proto ,我们将每种原始格式都放在Clickhouse的特定文件夹中。

我正在处理的问题是: 我有一个旧的原始原型,一段时间后我应该更改数据模式,因此我删除了旧的Kafka引擎表,并创建了一个带有相同表名称的新的。我还创建了一个新文件夹并在此处复制了新的原始文件,但是我发现ClickHouse Caches Proto架构每张表格,并且没有识别新的Proto Path,因此我创建了一个带有不同名称的新的Kafka引擎表,但是此时Clickhouse找到了原始文件但它发生了错误和错误:

<Error> void DB::StorageKafka::threadFunc(size_t): Code: 36. DB::Exception: Not found a     message named 'MyMessage' in the schema file 'test/my_message.proto': While executing Kafka. (BAD_ARGUMENTS), Stack trace (when copying this message, always include the lines below): 

我想知道如何解决此问题,我应该删除缓存,如果是,我在哪里可以找到缓存文件路径?

We have a cluster of 2 clickhouse nodes. We use it for streaming from kafka, so we use kafka engine table. The data format is proto and we put each proto format in a specific folder in clickhouse.

The issue I am dealing with is:
I had an old proto, after a while I should change the schema of data, so I removed the old kafka engine table and created a new one with the same table name. I also created a new folder and copied the new proto here, but I found that Clickhouse caches proto schema per table and didn't recognize the new proto path, so I created a new kafka engine table with different name, but this time Clickhouse found the proto filee but it rasied and error:

<Error> void DB::StorageKafka::threadFunc(size_t): Code: 36. DB::Exception: Not found a     message named 'MyMessage' in the schema file 'test/my_message.proto': While executing Kafka. (BAD_ARGUMENTS), Stack trace (when copying this message, always include the lines below): 

I wonder how to resolve this issues, should I delete cache, If so, where can I find the cache files path?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

メ斷腸人バ 2025-02-19 04:59:47

我解决了这个问题,我做了以下步骤:

  1. 更改kafka引擎表

  2. 更改消费者组名称添加新版本,该名称应在Kafka Engine Table

    中指定

  3. 更改文件夹和原始文件名(可能不需要文件夹名称更改)

  4. 例如,在原始文件中更改消息名称:

    消息消息1 {.....}

    消息消息1 {.....}

在原始文件中更改消息的名称,然后在存在的任何地方更改Message1和Message2。
您无需更改实现的视图名称(消费者名称)和事件最终表名称。

I resolved this issue, I did these steps:

  1. Change kafka engine table for example add a new version to it's name

  2. Change consumer group name which should be specified in kafka engine table

  3. Change the folder and proto file name(folder name change may not be needed)

  4. Change the name of messages in proto file for example:

    message MESSAGE1{.....}

    message MESSAGE1 {.....}

Then change MESSAGE1 and MESSAGE2 wherever exists.
you don't need to change materialized view name (consumer name) and event the final table name.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文