Is there a way to assign the number of partitions on table dynamically relying on topic's number of partitions

オープン
#542 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
15/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
kafka, python

調査の方向性

The report is about the partitions argument of app.Table(...) and the .partitions attribute of app.topic(...), which reads as None when the table is declared. Start by finding where the topic's partition count is set or resolved, and check whether it is known at declaration time or only after the Kafka metadata is fetched. Done means the table's partition count can follow an external topic's count, or the issue gets a maintainer decision that this is not supported. The thread is over a year old with no linked pull request, so ask a maintainer about the intended design first.

索引モデルが issue の本文から書いたものです。

説明

question

Checklist

  • I have included information about relevant versions
  • I have verified that the issue persists when using the master branch of Faust.

Steps to reproduce

I want to know if there is a way to assign the number of partitions on table dynamically relying on topic's number of partitions. In my app I consume from external topics which doesn't belong to me which has different number of partitions in different environment and their number can be changed in future, but I do modify table under those topics and thus the number of partitions should be equal.

Expected behavior

I wanted to achieve it with something like that, but it doesn't work:

courier_event_topic = app.topic(
    "courier_topic",
)

courier_table = app.Table(
    "courier_table",
    default=set,
    partitions=courier_event_topic.partitions,
)

Actual behavior

right now in code above courier_event_topic.partitions will be None

Versions

  • Python version: Python 3.10.6
  • Faust version: 0.10.14
  • Operating system: Ubuntu 22
  • Kafka version: 3.4
  • RocksDB version (if applicable)
主要言語
Python
スター
1.9k
フォーク
205
平均マージ
2時間 2分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

faust-streaming/faust のほかの issue

faust-streaming/faust の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。