SourceBuilderBase¶
SourceBuilderBase
is an abstraction of source builders (that KSPlanBuilder
uses when visiting a TableSource).
Contract¶
Building KTable¶
KTable<K, GenericRow> buildKTable(
SourceStep<?> streamSource,
RuntimeBuildContext buildContext,
Consumed<K, GenericRow> consumed,
Function<K, Collection<?>> keyGenerator,
Materialized<K, GenericRow, KeyValueStore<Bytes, byte[]>> materialized,
Serde<GenericRow> valueSerde,
String stateStoreName,
PlanInfo planInfo)
Builds a KTable
(Kafka Streams)
Used when:
SourceBuilderBase
is requested to buildTableSourceBuilderV1
is requested to buildWindowedTable
Building Table Materialized¶
Materialized<GenericKey, GenericRow, KeyValueStore<Bytes, byte[]>>
buildTableMaterialized(
SourceStep<KTableHolder<GenericKey>> source,
RuntimeBuildContext buildContext,
MaterializedFactory materializedFactory,
Serde<GenericKey> keySerde,
Serde<GenericRow> valueSerde,
String stateStoreName)
Builds a Materialized
(Kafka Streams)
Used when:
SourceBuilderBase
is requested to buildTable
Implementations¶
Building KTableHolder¶
KTableHolder<GenericKey> buildTable(
RuntimeBuildContext buildContext,
SourceStep<KTableHolder<GenericKey>> source,
ConsumedFactory consumedFactory,
MaterializedFactory materializedFactory,
PlanInfo planInfo)
buildTable
gets a PhysicalSchema, a ValueSerde and a KeySerde (Serde<GenericKey>
s) of the given SourceStep.
buildTable
builds a Consumed<GenericKey, GenericRow>
(Kafka Streams) for the given SourceStep (with AutoOffsetReset.EARLIEST
offset reset).
buildTable
tableChangeLogOpName.
buildTable
builds a Materialized<GenericKey, GenericRow, KeyValueStore<Bytes, byte[]>>
(Kafka Streams).
buildTable
builds a KTable<GenericKey, GenericRow>
(Kafka Streams).
buildTable
requests the given SourceStep for the LogicalSchema and adds pseudocolumns.
In the end, buildTable
creates a KTableHolder
(with the KTable
).
buildTable
is used when:
KSPlanBuilder
is requested to visitTableSource