Class UserScore.ExtractAndSumScore

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.beam.sdk.transforms.display.HasDisplayData
    Enclosing class:
    UserScore

    public static class UserScore.ExtractAndSumScore
    extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.examples.complete.game.UserScore.GameActionInfo>,​org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,​java.lang.Integer>>>
    A transform to extract key/score information from GameActionInfo, and sum the scores. The constructor arg determines whether 'team' or 'user' info is extracted.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.apache.beam.sdk.transforms.PTransform

        annotations, displayData, name, resourceHints
    • 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.Integer>> expand​(org.apache.beam.sdk.values.PCollection<org.apache.beam.examples.complete.game.UserScore.GameActionInfo> gameInfo)  
      • Methods inherited from class org.apache.beam.sdk.transforms.PTransform

        addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • expand

        public org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,​java.lang.Integer>> expand​(org.apache.beam.sdk.values.PCollection<org.apache.beam.examples.complete.game.UserScore.GameActionInfo> gameInfo)
        Specified by:
        expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.examples.complete.game.UserScore.GameActionInfo>,​org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,​java.lang.Integer>>>