Class WordCount


  • public class WordCount
    extends Object
    Implements the "WordCount" program that computes a simple word occurrence histogram over text files. This Job can be executed in both streaming and batch execution modes.

    The input is a [list of] plain text file[s] with lines separated by a newline character.

    Usage:

    • --input <path>A list of input files and / or directories to read. If no input is provided, the program is run with default data from WordCountData.
    • --discovery-interval <duration>Turns the file reader into a continuous source that will monitor the provided input directories every interval and read any new files.
    • --output <path>The output directory where the Job will write the results. If no output path is provided, the Job will print the results to stdout .
    • --execution-mode <mode>The execution mode (BATCH, STREAMING, or AUTOMATIC) of this pipeline.

    This example shows how to:

    • Write a simple Flink DataStream program
    • Use tuple data types
    • Write and use a user-defined function
    • Constructor Detail

      • WordCount

        public WordCount()