Package org.apache.nemo.examples.beam
Class BeamWordCount.CountWords
- java.lang.Object
-
- org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<java.lang.String>,org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,java.lang.Long>>>
-
- org.apache.nemo.examples.beam.BeamWordCount.CountWords
-
- All Implemented Interfaces:
java.io.Serializable
,org.apache.beam.sdk.transforms.display.HasDisplayData
- Enclosing class:
- BeamWordCount
public static final class BeamWordCount.CountWords extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<java.lang.String>,org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,java.lang.Long>>>
A PTransform that converts a PCollection containing lines of text into a PCollection of formatted word counts.Concept #3: This is a custom composite transform that bundles two transforms (ParDo and Count) as a reusable PTransform subclass. Using composite transforms allows for easy reuse, modular testing, and an improved monitoring experience.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CountWords()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,java.lang.Long>>
expand(org.apache.beam.sdk.values.PCollection<java.lang.String> lines)
-
-
-
Method Detail
-
expand
public org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,java.lang.Long>> expand(org.apache.beam.sdk.values.PCollection<java.lang.String> lines)
- Specified by:
expand
in classorg.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<java.lang.String>,org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,java.lang.Long>>>
-
-