Class WordCount.Tokenizer
java.lang.Object
org.apache.flink.streaming.examples.dsv2.wordcount.WordCount.Tokenizer
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.datastream.api.function.OneInputStreamProcessFunction<String,,org.apache.flink.api.java.tuple.Tuple2<String, Integer>> org.apache.flink.datastream.api.function.ProcessFunction
- Enclosing class:
- WordCount
public static final class WordCount.Tokenizer
extends Object
implements org.apache.flink.datastream.api.function.OneInputStreamProcessFunction<String,org.apache.flink.api.java.tuple.Tuple2<String,Integer>>
Implements the string tokenizer that splits sentences into words as a user-defined
ProcessFunction. The process function takes a line (String) and splits it into multiple pairs
in the form of "(word,1)" (
Tuple2<String, Integer>).- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprocessRecord(String record, org.apache.flink.datastream.api.common.Collector<org.apache.flink.api.java.tuple.Tuple2<String, Integer>> output, org.apache.flink.datastream.api.context.PartitionedContext<org.apache.flink.api.java.tuple.Tuple2<String, Integer>> ctx) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.datastream.api.function.OneInputStreamProcessFunction
endInput, onProcessingTimer, onWatermark, openMethods inherited from interface org.apache.flink.datastream.api.function.ProcessFunction
close, declareWatermarks, usesStates
-
Constructor Details
-
Tokenizer
public Tokenizer()
-
-
Method Details
-
processRecord
-