In my Eclipse, I've got flagged with error " The type Sum.SumIntegerFn is not visible.
import org.apache.beam.sdk.transforms.Sum;
....
something = createAggregator("something", new Sum.SumIntegerFn());
I see from the import that you're using Apache Beam. You should use Sum.ofIntegers() instead of new Sum.SumIntegerFn().
Also note that in Github head, Aggregators have been removed. Instead, a counter metric will provide similar behavior. See Metrics for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With