Açıklaması şöyle
count is such a commonly used form of aggregation that it is offered as a first-class operation. Once you have the stream records grouped by key (KGroupedStream), you can count the number of records of a specific key by using this operation.The aggregate way of doing things can be replaced by a single method call!
Örnek
Şöyle yaparız
StreamsBuilder builder = new StreamsBuilder();KStream<String, String> stream = builder.stream(INPUT_TOPIC);stream.groupByKey().count();
No comments:
Post a Comment