Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google dataflow: the type Sum.SumIntegerFn is not visible

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());
like image 432
bignano Avatar asked Mar 13 '26 15:03

bignano


1 Answers

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.

like image 112
Ben Chambers Avatar answered Mar 19 '26 00:03

Ben Chambers