com.google.cloud.dataflow.examples.complete.game

## Class GameStats.CalculateSpammyUsers

- java.lang.Object
- - com.google.cloud.dataflow.sdk.transforms.PTransform<PCollection<KV<String,Integer>>,PCollection<KV<String,Integer>>>
  - - com.google.cloud.dataflow.examples.complete.game.GameStats.CalculateSpammyUsers

All Implemented Interfaces:
  HasDisplayData, Serializable

Enclosing class:
  GameStats

    public static class GameStats.CalculateSpammyUsers
    extends PTransform<PCollection<KV<String,Integer>>,PCollection<KV<String,Integer>>>

Filter out all but those users with a high clickrate, which we will consider as 'spammy' uesrs. We do this by finding the mean total score per user, then using that information as a side input to filter out all but those user scores that are > (mean * SCORE_WEIGHT)

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class com.google.cloud.dataflow.sdk.transforms.PTransform

`name`

### Constructor Summary

Constructors
Constructor and Description
`CalculateSpammyUsers()`

### Method Summary

All Methods Instance Methods Concrete Methods
`PCollection<KV<String,Integer>>` `apply(PCollection<KV<String,Integer>> userScores)`

### Methods inherited from class com.google.cloud.dataflow.sdk.transforms.PTransform

`getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString, validate`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### CalculateSpammyUsers

    public CalculateSpammyUsers()

### Method Detail

#### apply

    public PCollection<KV<String,Integer>> apply(PCollection<KV<String,Integer>> userScores)

Overrides:
  `apply` in class `PTransform<PCollection<KV<String,Integer>>,PCollection<KV<String,Integer>>>`