[Feature Request]: [Streaming/YAML] Add declarative IntervalJoin composite transform with watermark skew circuit breaker

Aperta
#41,224 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java, python, yaml

Direzione di ricerca

Start by reviewing Beam's existing stateful transforms and YAML transform registration; the issue names apache_beam.transforms.interval_join as the proposed module. The work needs to define event time buffering, timer eviction, watermark skew handling, and counters across supported runners. Done means the transform and YAML configuration work with the specified join behavior and skew actions, with tests covering matching, eviction, and skew metrics.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

Stream-to-stream interval joins (e.g. click-to-conversion attribution where t_click <= t_order <= t_click + 15m) are a core streaming pattern.
Currently in Apache Beam, implementing event-time interval joins requires complex, low-level stateful CoGroupByKey DoFns with BagStateSpec and timers. Furthermore, if one stream experiences extreme watermark lag (hours or days due to network split or backfill), state buffers grow unbounded, leading to worker memory exhaustion (OOM crashes on Dataflow Windmill and Flink).

Proposed Architecture

Add a native IntervalJoin composite PTransform in apache_beam.transforms.interval_join and register type: IntervalJoin in Beam YAML:

pipeline:
  transforms:
    - type: IntervalJoin
      config:
        left: ReadClicks
        right: ReadOrders
        key: user_id
        left_timestamp: click_time
        right_timestamp: order_time
        lower_bound: "0s"
        upper_bound: "15m"
        max_watermark_skew: "5m"  # Circuit breaker threshold
        skew_action: drop          # drop or dlq
Key Capabilities
  1. Event-Time State Machine: Built-in BagStateSpec buffers and timer eviction on Dataflow Windmill and Flink state backends.
  2. Watermark Skew Circuit Breaker: Safely drops or quarantines incoming records whose timestamps fall behind the opposite stream's watermark by more than max_watermark_skew, preventing worker OOMs under heavy lag.
  3. Observability: Emits watermark_skew_dropped Beam counters for monitoring.
Lingua principale
Java
Stelle
8.7k
Fork
4.8k
Merge medio
2g 12h
PR unite (30g)
371

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/beam

Tutte le issue di apache/beam

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.