Class BeamWordCount.FormatAsTextFn

  • All Implemented Interfaces:
    Serializable, org.apache.beam.sdk.transforms.display.HasDisplayData, org.apache.beam.sdk.transforms.ProcessFunction<org.apache.beam.sdk.values.KV<String,​Long>,​String>, org.apache.beam.sdk.transforms.SerializableFunction<org.apache.beam.sdk.values.KV<String,​Long>,​String>
    Enclosing class:
    BeamWordCount

    public static final class BeamWordCount.FormatAsTextFn
    extends org.apache.beam.sdk.transforms.SimpleFunction<org.apache.beam.sdk.values.KV<String,​Long>,​String>
    A SimpleFunction that converts a Word and Count into a printable string.
    See Also:
    Serialized Form
    • Constructor Detail

      • FormatAsTextFn

        public FormatAsTextFn()
    • Method Detail

      • apply

        public String apply​(org.apache.beam.sdk.values.KV<String,​Long> input)
        Specified by:
        apply in interface org.apache.beam.sdk.transforms.ProcessFunction<org.apache.beam.sdk.values.KV<String,​Long>,​String>
        Specified by:
        apply in interface org.apache.beam.sdk.transforms.SerializableFunction<org.apache.beam.sdk.values.KV<String,​Long>,​String>
        Overrides:
        apply in class org.apache.beam.sdk.transforms.SimpleFunction<org.apache.beam.sdk.values.KV<String,​Long>,​String>