Browse Source

KAFKA-7492 : Updated javadocs for aggregate and reduce methods returning null behavior. (#6285)

This is an update to the existing javadocs for KGroupedStream class.

Guozhang Wang <wangguoz@gmail.com>, Matthias J. Sax <mjsax@apache.org>,  John Roesler <john@confluent.io>, Bill Bejeck <bbejeck@gmail.com>
pull/6311/head
asutosh936 6 years ago committed by Bill Bejeck
parent
commit
93ba9621fe
  1. 16
      streams/src/main/java/org/apache/kafka/streams/kstream/KGroupedStream.java

16
streams/src/main/java/org/apache/kafka/streams/kstream/KGroupedStream.java

@ -146,7 +146,9 @@ public interface KGroupedStream<K, V> { @@ -146,7 +146,9 @@ public interface KGroupedStream<K, V> {
*
* @param reducer a {@link Reducer} that computes a new aggregate result. Cannot be {@code null}.
* @return a {@link KTable} that contains "update" records with unmodified keys, and values that represent the
* latest (rolling) aggregate for each key
* latest (rolling) aggregate for each key. If the reduce function returns {@code null}, it is then interpreted as
* deletion for the key, and future messages of the same key coming from upstream operators
* will be handled as newly initialized value.
*/
KTable<K, V> reduce(final Reducer<V> reducer);
@ -208,7 +210,9 @@ public interface KGroupedStream<K, V> { @@ -208,7 +210,9 @@ public interface KGroupedStream<K, V> {
* @param reducer a {@link Reducer} that computes a new aggregate result. Cannot be {@code null}.
* @param materialized an instance of {@link Materialized} used to materialize a state store. Cannot be {@code null}.
* @return a {@link KTable} that contains "update" records with unmodified keys, and values that represent the
* latest (rolling) aggregate for each key
* latest (rolling) aggregate for each key. If the reduce function returns {@code null}, it is then interpreted as
* deletion for the key, and future messages of the same key coming from upstream operators
* will be handled as newly initialized value.
*/
KTable<K, V> reduce(final Reducer<V> reducer,
final Materialized<K, V, KeyValueStore<Bytes, byte[]>> materialized);
@ -251,7 +255,9 @@ public interface KGroupedStream<K, V> { @@ -251,7 +255,9 @@ public interface KGroupedStream<K, V> {
* @param aggregator an {@link Aggregator} that computes a new aggregate result
* @param <VR> the value type of the resulting {@link KTable}
* @return a {@link KTable} that contains "update" records with unmodified keys, and values that represent the
* latest (rolling) aggregate for each key
* latest (rolling) aggregate for each key. If the aggregate function returns {@code null}, it is then interpreted as
* deletion for the key, and future messages of the same key coming from upstream operators
* will be handled as newly initialized value.
*/
<VR> KTable<K, VR> aggregate(final Initializer<VR> initializer,
final Aggregator<? super K, ? super V, VR> aggregator);
@ -308,7 +314,9 @@ public interface KGroupedStream<K, V> { @@ -308,7 +314,9 @@ public interface KGroupedStream<K, V> {
* @param materialized an instance of {@link Materialized} used to materialize a state store. Cannot be {@code null}.
* @param <VR> the value type of the resulting {@link KTable}
* @return a {@link KTable} that contains "update" records with unmodified keys, and values that represent the
* latest (rolling) aggregate for each key
* latest (rolling) aggregate for each key. If the aggregate function returns {@code null}, it is then interpreted as
* deletion for the key, and future messages of the same key coming from upstream operators
* will be handled as newly initialized value.
*/
<VR> KTable<K, VR> aggregate(final Initializer<VR> initializer,
final Aggregator<? super K, ? super V, VR> aggregator,

Loading…
Cancel
Save