Class WordCount
- java.lang.Object
-
- org.apache.flink.examples.java.wordcount.WordCount
-
public class WordCount extends Object
Implements the "WordCount" program that computes a simple word occurrence histogram over text files.The input is a plain text file with lines separated by newline characters.
Usage:
WordCount --input <path> --output <path>
If no parameters are provided, the program is run with default data fromWordCountData.This example shows how to:
- write a simple Flink program.
- use Tuple data types.
- write and use user-defined functions.
Note: All Flink DataSet APIs are deprecated since Flink 1.18 and will be removed in a future Flink major version. You can still build your application in DataSet, but you should move to either the DataStream and/or Table API. This class is retained for testing purposes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWordCount.TokenizerImplements the string tokenizer that splits sentences into words as a user-defined FlatMapFunction.
-
Constructor Summary
Constructors Constructor Description WordCount()
-