Class SideOutputExample.Tokenizer
-
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction
- Enclosing class:
- SideOutputExample
public static final class SideOutputExample.Tokenizer extends org.apache.flink.streaming.api.functions.ProcessFunction<String,org.apache.flink.api.java.tuple.Tuple2<String,Integer>>
Implements the string tokenizer that splits sentences into words as a user-defined FlatMapFunction. The function takes a line (String) and splits it into multiple pairs in the form of "(word,1)" (Tuple2<String, Integer>).This rejects words that are longer than 5 characters long.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Tokenizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprocessElement(String value, org.apache.flink.streaming.api.functions.ProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.api.java.tuple.Tuple2<String,Integer>> out)
-