Package org.apache.beam.sdk.transforms
Class Combine.SimpleCombineFn<V>
java.lang.Object
org.apache.beam.sdk.transforms.Combine.CombineFn<V,List<V>,V>
org.apache.beam.sdk.transforms.Combine.IterableCombineFn<V>
org.apache.beam.sdk.transforms.Combine.SimpleCombineFn<V>
- All Implemented Interfaces:
Serializable,CombineFnBase.GlobalCombineFn<V,,List<V>, V> HasDisplayData,org.apache.beam.sdk.util.NameUtils.NameOverride
- Enclosing class:
Combine
Deprecated.
Converts a
SerializableFunction from Iterable<V>s to Vs into a simple
Combine.CombineFn over Vs.
@deprecated Use Combine.IterableCombineFn or the more space efficient Combine.BinaryCombineFn instead (which avoids buffering values).
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSimpleCombineFn(SerializableFunction<Iterable<V>, V> combiner) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionTypeVariable<?> Returns theTypeVariableofAccumT.getAccumulatorCoder(CoderRegistry registry, Coder<V> inputCoder) Returns theCoderto use for accumulatorAccumTvalues, or null if it is not able to be inferred.getDefaultOutputCoder(CoderRegistry registry, Coder<V> 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().TypeVariable<?> Returns theTypeVariableofInputT.TypeVariable<?> Returns theTypeVariableofOutputT.static <V> Combine.SimpleCombineFn<V> of(SerializableFunction<Iterable<V>, V> combiner) Deprecated.Returns aCombineFnthat uses the givenSerializableFunctionto combine values.Methods inherited from class org.apache.beam.sdk.transforms.Combine.IterableCombineFn
addInput, compact, createAccumulator, extractOutput, getNameOverride, mergeAccumulators, of, populateDisplayDataMethods inherited from class org.apache.beam.sdk.transforms.Combine.CombineFn
apply, defaultValue, getInputType, getOutputType
-
Constructor Details
-
SimpleCombineFn
Deprecated.
-
-
Method Details
-
of
Deprecated.Returns aCombineFnthat uses the givenSerializableFunctionto combine values. -
getAccumulatorCoder
public Coder<List<V>> getAccumulatorCoder(CoderRegistry registry, Coder<V> inputCoder) throws CannotProvideCoderException Description copied from interface:CombineFnBase.GlobalCombineFnReturns 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.
- Specified by:
getAccumulatorCoderin interfaceCombineFnBase.GlobalCombineFn<InputT,AccumT, OutputT> - Throws:
CannotProvideCoderException
-
getDefaultOutputCoder
public Coder<V> getDefaultOutputCoder(CoderRegistry registry, Coder<V> inputCoder) throws CannotProvideCoderException Description copied from interface:CombineFnBase.GlobalCombineFnReturns 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.- Specified by:
getDefaultOutputCoderin interfaceCombineFnBase.GlobalCombineFn<InputT,AccumT, OutputT> - Throws:
CannotProvideCoderException
-
getIncompatibleGlobalWindowErrorMessage
Description copied from interface:CombineFnBase.GlobalCombineFnReturns the error message for not supported default values in Combine.globally().- Specified by:
getIncompatibleGlobalWindowErrorMessagein interfaceCombineFnBase.GlobalCombineFn<InputT,AccumT, OutputT>
-
getInputTVariable
Returns theTypeVariableofInputT. -
getAccumTVariable
Returns theTypeVariableofAccumT. -
getOutputTVariable
Returns theTypeVariableofOutputT.
-