public static class TwitterStream.SelectEnglishAndTokenizeFlatMap extends org.apache.flink.streaming.connectors.json.JSONParseFlatMap<String,org.apache.flink.api.java.tuple.Tuple2<String,Integer>>
Implements a 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
| Constructor and Description |
|---|
SelectEnglishAndTokenizeFlatMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
flatMap(String value,
org.apache.flink.util.Collector<org.apache.flink.api.java.tuple.Tuple2<String,Integer>> out)
Select the language from the incoming JSON text
|
get, getBoolean, getDouble, getInt, getLong, getStringpublic void flatMap(String value, org.apache.flink.util.Collector<org.apache.flink.api.java.tuple.Tuple2<String,Integer>> out) throws Exception
flatMap in interface org.apache.flink.api.common.functions.FlatMapFunction<String,org.apache.flink.api.java.tuple.Tuple2<String,Integer>>flatMap in class org.apache.flink.api.common.functions.RichFlatMapFunction<String,org.apache.flink.api.java.tuple.Tuple2<String,Integer>>ExceptionCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.