Class MinimalWordCount
- java.lang.Object
-
- org.apache.beam.examples.MinimalWordCount
-
public class MinimalWordCount extends java.lang.ObjectAn example that counts words in Shakespeare.This class,
MinimalWordCount, is the first in a series of four successively more detailed 'word count' examples. Here, for simplicity, we don't show any error-checking or argument processing, and focus on construction of the pipeline, which chains together the application of core transforms.Next, see the
WordCountpipeline, then theDebuggingWordCount, and finally theWindowedWordCountpipeline, for more detailed examples that introduce additional concepts.Concepts:
1. Reading data from text files 2. Specifying 'inline' transforms 3. Counting items in a PCollection 4. Writing data to text files
No arguments are required to run this pipeline. It will be executed with the DirectRunner. You can see the results in the output files in your current working directory, with names like "wordcounts-00001-of-00005. When running on a distributed service, you would use an appropriate file service.
-
-
Constructor Summary
Constructors Constructor Description MinimalWordCount()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)
-