KGroupedStreamImpl

KGroupedStreamImpl is a concrete stream of grouped records that is created for KStream.groupBy and KStream.groupByKey streaming operators.

KGroupedStreamImpl takes the following to be created:

KGroupedStreamImpl uses a GroupedStreamAggregateBuilder for…​FIXME

aggregate Method

KTable<K, VR> aggregate(
  final Initializer<VR> initializer,
  final Aggregator<? super K, ? super V, VR> aggregator)
KTable<K, VR> aggregate(
  final Initializer<VR> initializer,
  final Aggregator<? super K, ? super V, VR> aggregator,
  final Materialized<K, VR, KeyValueStore<Bytes, byte[]>> materialized)
Note
aggregate is part of KGroupedStream Contract to…​FIXME.

aggregate…​FIXME

reduce Method

KTable<K, V> reduce(final Reducer<V> reducer)
KTable<K, V> reduce(
  final Reducer<V> reducer,
  final Materialized<K, V, KeyValueStore<Bytes, byte[]>> materialized)
Note
reduce is part of KGroupedStream Contract to…​FIXME.

reduce…​FIXME

Creating SessionWindowedKStream Instance — windowedBy Method

SessionWindowedKStream<K, V> windowedBy(final SessionWindows windows)
Note
windowedBy is part of KGroupedStream Contract to…​FIXME.

windowedBy…​FIXME

Creating TimeWindowedKStream Instance — windowedBy Method

TimeWindowedKStream<K, V> windowedBy(final Windows<W> windows)
Note
windowedBy is part of KGroupedStream Contract to…​FIXME.

windowedBy…​FIXME

Building KTable — doAggregate Internal Method

KTable<K, T> doAggregate(
  final KStreamAggProcessorSupplier<K, ?, V, T> aggregateSupplier,
  final String functionName,
  final MaterializedInternal<K, T, KeyValueStore<Bytes, byte[]>> materializedInternal)

doAggregate…​FIXME

Note
doAggregate is used when KGroupedStreamImpl is requested to reduce, aggregate and doCount (when count).

doCount Internal Method

KTable<K, Long> doCount(final Materialized<K, Long, KeyValueStore<Bytes, byte[]>> materialized)

doCount creates a MaterializedInternal for the given Materialized and requests it to generateStoreNameIfNeeded (with the InternalStreamsBuilder and KSTREAM-AGGREGATE- store name prefix).

Unless specified (and not null), doCount defines key and value serdes.

In the end, doCount doAggregate with a new KStreamAggregate, KSTREAM-AGGREGATE- function name prefix, and the MaterializedInternal.

Note
doCount is used exclusively when KGroupedStreamImpl is requested to count.

count Method

KTable<K, Long> count()
KTable<K, Long> count(final Materialized<K, Long, KeyValueStore<Bytes, byte[]>> materialized)
Note
count is part of the KGroupedStream Contract to…​FIXME.

count simply doCount with the given Materialized or one with no state store name, the key serde and Long serde for values.

results matching ""

    No results matching ""