public class WordCount extends Object
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:
Modifier and Type | Class and Description |
---|---|
static class |
WordCount.Tokenizer
Implements the string tokenizer that splits sentences into words as a user-defined
FlatMapFunction.
|
Constructor and Description |
---|
WordCount() |
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.