Google Cloud Dataflow SDK for Java, version 1.9.1
Class Combine.SimpleCombineFn<V>
- java.lang.Object
-
- com.google.cloud.dataflow.sdk.transforms.Combine.CombineFn<V,List<V>,V>
-
- com.google.cloud.dataflow.sdk.transforms.Combine.IterableCombineFn<V>
-
- com.google.cloud.dataflow.sdk.transforms.Combine.SimpleCombineFn<V>
-
- All Implemented Interfaces:
- CombineFnBase.GlobalCombineFn<V,List<V>,V>, HasDisplayData, Serializable
- Enclosing class:
- Combine
Deprecated.
@Deprecated public static class Combine.SimpleCombineFn<V> extends Combine.IterableCombineFn<V>
Converts aSerializableFunction
fromIterable<V>
s toV
s into a simpleCombine.CombineFn
overV
s.@deprecated Use
Combine.IterableCombineFn
or the more space efficientCombine.BinaryCombineFn
instead (which avoids buffering values).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor and Description protected
SimpleCombineFn(SerializableFunction<Iterable<V>,V> combiner)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description TypeVariable<?>
getAccumTVariable()
Returns theTypeVariable
ofAccumT
.Coder<AccumT>
getAccumulatorCoder(CoderRegistry registry, Coder<InputT> inputCoder)
Returns theCoder
to use for accumulatorAccumT
values, or null if it is not able to be inferred.Coder<OutputT>
getDefaultOutputCoder(CoderRegistry registry, Coder<InputT> inputCoder)
Returns theCoder
to use by default for outputOutputT
values, or null if it is not able to be inferred.String
getIncompatibleGlobalWindowErrorMessage()
Returns the error message for not supported default values in Combine.globally().TypeVariable<?>
getInputTVariable()
Returns theTypeVariable
ofInputT
.TypeVariable<?>
getOutputTVariable()
Returns theTypeVariable
ofOutputT
.static <V> Combine.SimpleCombineFn<V>
of(SerializableFunction<Iterable<V>,V> combiner)
Deprecated.-
Methods inherited from class com.google.cloud.dataflow.sdk.transforms.Combine.IterableCombineFn
addInput, compact, createAccumulator, extractOutput, mergeAccumulators, of, populateDisplayData
-
Methods inherited from class com.google.cloud.dataflow.sdk.transforms.Combine.CombineFn
apply, asKeyedFn, defaultValue, getOutputType
-
-
-
-
Constructor Detail
-
SimpleCombineFn
protected SimpleCombineFn(SerializableFunction<Iterable<V>,V> combiner)
Deprecated.
-
-
Method Detail
-
of
@Deprecated public static <V> Combine.SimpleCombineFn<V> of(SerializableFunction<Iterable<V>,V> combiner)
Deprecated.Returns aCombineFn
that uses the givenSerializableFunction
to combine values.
-
getAccumulatorCoder
public Coder<AccumT> getAccumulatorCoder(CoderRegistry registry, Coder<InputT> inputCoder) throws CannotProvideCoderException
Description copied from interface:CombineFnBase.GlobalCombineFn
Returns theCoder
to use for accumulatorAccumT
values, or null if it is not able to be inferred.By default, uses the knowledge of the
Coder
being used forInputT
values and the enclosingPipeline
'sCoderRegistry
to try to infer the Coder forAccumT
values.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:
getAccumulatorCoder
in interfaceCombineFnBase.GlobalCombineFn<InputT,AccumT,OutputT>
- Throws:
CannotProvideCoderException
-
getDefaultOutputCoder
public Coder<OutputT> getDefaultOutputCoder(CoderRegistry registry, Coder<InputT> inputCoder) throws CannotProvideCoderException
Description copied from interface:CombineFnBase.GlobalCombineFn
Returns theCoder
to use by default for outputOutputT
values, or null if it is not able to be inferred.By default, uses the knowledge of the
Coder
being used for inputInputT
values and the enclosingPipeline
'sCoderRegistry
to try to infer the Coder forOutputT
values.- Specified by:
getDefaultOutputCoder
in interfaceCombineFnBase.GlobalCombineFn<InputT,AccumT,OutputT>
- Throws:
CannotProvideCoderException
-
getIncompatibleGlobalWindowErrorMessage
public String getIncompatibleGlobalWindowErrorMessage()
Description copied from interface:CombineFnBase.GlobalCombineFn
Returns the error message for not supported default values in Combine.globally().- Specified by:
getIncompatibleGlobalWindowErrorMessage
in interfaceCombineFnBase.GlobalCombineFn<InputT,AccumT,OutputT>
-
getInputTVariable
public TypeVariable<?> getInputTVariable()
Returns theTypeVariable
ofInputT
.
-
getAccumTVariable
public TypeVariable<?> getAccumTVariable()
Returns theTypeVariable
ofAccumT
.
-
getOutputTVariable
public TypeVariable<?> getOutputTVariable()
Returns theTypeVariable
ofOutputT
.
-
-