Class WordCountWindowFunction
java.lang.Object
org.apache.pulsar.functions.api.examples.window.WordCountWindowFunction
- All Implemented Interfaces:
WindowFunction<String,Void>
The classic word count example done using pulsar functions
Each input message is a sentence that split into words and each word counted.
The built in counter state is used to keep track of the word count in a
persistent and consistent manner.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprocess(Collection<Record<String>> inputs, WindowContext context)
-
Constructor Details
-
WordCountWindowFunction
public WordCountWindowFunction()
-
-
Method Details
-
process
- Specified by:
processin interfaceWindowFunction<String,Void> - Throws:
Exception
-