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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Tokenizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprocessRecord(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, wait
-
-
-
-
Method Detail
-
processRecord
public void processRecord(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) throws Exception
-
-