Class WordCount.FormatAsTextFn

java.lang.Object
org.apache.beam.sdk.transforms.InferableFunction<org.apache.beam.sdk.values.KV<String,Long>,String>
org.apache.beam.sdk.transforms.SimpleFunction<org.apache.beam.sdk.values.KV<String,Long>,String>
org.apache.beam.runners.spark.structuredstreaming.examples.WordCount.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:
WordCount

public static class WordCount.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:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(org.apache.beam.sdk.values.KV<String,Long> input)
     

    Methods inherited from class org.apache.beam.sdk.transforms.SimpleFunction

    fromSerializableFunctionWithOutputType

    Methods inherited from class org.apache.beam.sdk.transforms.InferableFunction

    fromProcessFunctionWithOutputType, getInputTypeDescriptor, getOutputTypeDescriptor, populateDisplayData

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FormatAsTextFn

      public FormatAsTextFn()
  • Method Details

    • 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>