public static class Sum.SumDoubleFn extends Combine.BinaryCombineDoubleFn implements com.google.cloud.dataflow.sdk.util.common.CounterProvider<Double>
SerializableFunction that computes the sum of an
Iterable of Doubles, useful as an argument to
Combine.globally(com.google.cloud.dataflow.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>) or Combine.perKey(com.google.cloud.dataflow.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>).| Constructor and Description |
|---|
SumDoubleFn() |
| Modifier and Type | Method and Description |
|---|---|
double |
apply(double a,
double b)
Applies the binary operation to the two operands, returning the result.
|
TypeVariable<?> |
getAccumTVariable()
Returns the
TypeVariable of AccumT. |
com.google.cloud.dataflow.sdk.util.common.Counter<Double> |
getCounter(String name) |
String |
getIncompatibleGlobalWindowErrorMessage()
Returns the error message for not supported default values in Combine.globally().
|
TypeVariable<?> |
getInputTVariable()
Returns the
TypeVariable of InputT. |
TypeVariable<?> |
getOutputTVariable()
Returns the
TypeVariable of OutputT. |
double |
identity()
Returns the identity element of this operation, i.e.
|
addInput, createAccumulator, extractOutput, getAccumulatorCoder, getDefaultOutputCoder, mergeAccumulatorsapply, asKeyedFn, compact, defaultValue, getOutputTypepublic double apply(double a,
double b)
Combine.BinaryCombineDoubleFnapply in class Combine.BinaryCombineDoubleFnpublic double identity()
Combine.BinaryCombineDoubleFne
such that apply(e, x) == apply(x, e) == x for all values of x.identity in class Combine.BinaryCombineDoubleFnpublic com.google.cloud.dataflow.sdk.util.common.Counter<Double> getCounter(String name)
getCounter in interface com.google.cloud.dataflow.sdk.util.common.CounterProvider<Double>getCounter in class Combine.BinaryCombineDoubleFnpublic String getIncompatibleGlobalWindowErrorMessage()
CombineFnBase.GlobalCombineFngetIncompatibleGlobalWindowErrorMessage in interface CombineFnBase.GlobalCombineFn<InputT,AccumT,OutputT>public TypeVariable<?> getInputTVariable()
TypeVariable of InputT.public TypeVariable<?> getAccumTVariable()
TypeVariable of AccumT.public TypeVariable<?> getOutputTVariable()
TypeVariable of OutputT.