Class WordCountFunction
- java.lang.Object
-
- org.apache.pulsar.functions.api.examples.WordCountFunction
-
- All Implemented Interfaces:
org.apache.pulsar.functions.api.Function<java.lang.String,java.lang.Void>
public class WordCountFunction extends java.lang.Object implements org.apache.pulsar.functions.api.Function<java.lang.String,java.lang.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 Constructor Description WordCountFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Voidprocess(java.lang.String input, org.apache.pulsar.functions.api.Context context)
-