Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. First of all, we will repartition the other KTable's stream, by key computed from the mapper(K1, V1) → K, so that it is co-partitioned by the same key. The co-partition topic is partitioned on the new key, but the message key and value are unchanged, and log compaction is turned off.
    1. When sendOldValues is turned on, where a pair <old, new> is passed into the other KTable's stream, then the mapped key may be different, and hence two separate records will be sent to the re-partition topic, one for removal and one for addition.
  2. After re-partitioning the other table, materialize both streams. This table is materialized as K → V, the other table is materialized as combo key (K, K1) → V1 (note that we need to apply the mapper(K1, V1) → K again).
  3. When a record (k, v) is received from this table's stream, update its materialized table, and then make a range query on the other materialized table as (k, *), and for each matched record apply the joiner(V, V1) → R, and return (K, R).
  4. When a record (k1, v1) is received from the other table's stream, update its materialized table by applying the mapper, and then make a get query on the other this materialized table by mapped key k, and for the single matched record apply reversed joiner(V1, V) → R, and return (K, R).

...