Interface CombineFnBase.GlobalCombineFn<InputT,AccumT,OutputT>
- Type Parameters:
InputT- type of input valuesAccumT- type of mutable accumulator valuesOutputT- type of output values
- All Superinterfaces:
HasDisplayData,Serializable
- All Known Implementing Classes:
ApproximateDistinct.ApproximateDistinctFn,ApproximateQuantiles.ApproximateQuantilesCombineFn,ApproximateUnique.ApproximateUniqueCombineFn,ArrayAgg.ArrayAggArray,BeamBuiltinAggregations.BitXOr,BeamBuiltinAnalyticFunctions.PositionAwareCombineFn,Combine.AccumulatingCombineFn,Combine.BinaryCombineDoubleFn,Combine.BinaryCombineFn,Combine.BinaryCombineIntegerFn,Combine.BinaryCombineLongFn,Combine.CombineFn,Combine.IterableCombineFn,Combine.SimpleCombineFn,CombineFns.ComposedCombineFn,CombineFns.ComposedCombineFnWithContext,CombineWithContext.CombineFnWithContext,CountIf.CountIfFn,CovarianceFn,DefaultSequenceCombiner,FlinkStreamingAggregationsTranslators.ConcatenateAsIterable,LazyAggregateCombineFn,Sample.FixedSizedSampleFn,SketchFrequencies.CountMinSketchFn,SnowflakeIO.Concatenate,StringAgg.StringAggByte,StringAgg.StringAggString,TDigestQuantiles.TDigestQuantilesFn,Top.TopCombineFn,TypedCombineFnDelegate,VarianceFn
- Enclosing class:
CombineFnBase
A GloballyCombineFn<InputT, AccumT, OutputT> specifies how to combine a collection
of input values of type InputT into a single output value of type OutputT. It
does this via one or more intermediate mutable accumulator values of type AccumT.
Do not implement this interface directly. Extends Combine.CombineFn and CombineWithContext.CombineFnWithContext instead.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the default value when there are no values added to the accumulator.getAccumulatorCoder(CoderRegistry registry, Coder<InputT> inputCoder) Returns theCoderto use for accumulatorAccumTvalues, or null if it is not able to be inferred.getDefaultOutputCoder(CoderRegistry registry, Coder<InputT> inputCoder) Returns theCoderto use by default for outputOutputTvalues, or null if it is not able to be inferred.Returns the error message for not supported default values in Combine.globally().Methods inherited from interface org.apache.beam.sdk.transforms.display.HasDisplayData
populateDisplayData
-
Method Details
-
getAccumulatorCoder
Coder<AccumT> getAccumulatorCoder(CoderRegistry registry, Coder<InputT> inputCoder) throws CannotProvideCoderException Returns theCoderto use for accumulatorAccumTvalues, or null if it is not able to be inferred.By default, uses the knowledge of the
Coderbeing used forInputTvalues and the enclosingPipeline'sCoderRegistryto try to infer the Coder forAccumTvalues.This is the Coder used to send data through a communication-intensive shuffle step, so a compact and efficient representation may have significant performance benefits.
- Throws:
CannotProvideCoderException
-
getDefaultOutputCoder
Coder<OutputT> getDefaultOutputCoder(CoderRegistry registry, Coder<InputT> inputCoder) throws CannotProvideCoderException Returns theCoderto use by default for outputOutputTvalues, or null if it is not able to be inferred.By default, uses the knowledge of the
Coderbeing used for inputInputTvalues and the enclosingPipeline'sCoderRegistryto try to infer the Coder forOutputTvalues.- Throws:
CannotProvideCoderException
-
getIncompatibleGlobalWindowErrorMessage
String getIncompatibleGlobalWindowErrorMessage()Returns the error message for not supported default values in Combine.globally(). -
defaultValue
OutputT defaultValue()Returns the default value when there are no values added to the accumulator.
-