@Deprecated public static class Combine.SimpleCombineFn<V> extends Combine.IterableCombineFn<V>
SerializableFunction
from Iterable<V>
s to V
s into a simple
Combine.CombineFn
over V
s.
@deprecated Use Combine.IterableCombineFn
or the more space efficient Combine.BinaryCombineFn
instead (which avoids buffering values).
Modifier | Constructor and Description |
---|---|
protected |
SimpleCombineFn(SerializableFunction<java.lang.Iterable<V>,V> combiner)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.lang.reflect.TypeVariable<?> |
getAccumTVariable()
Returns the
TypeVariable of AccumT . |
Coder<AccumT> |
getAccumulatorCoder(CoderRegistry registry,
Coder<InputT> inputCoder)
Returns the
Coder to use for accumulator AccumT values, or null if it is not
able to be inferred. |
Coder<OutputT> |
getDefaultOutputCoder(CoderRegistry registry,
Coder<InputT> inputCoder)
Returns the
Coder to use by default for output OutputT values, or null if it
is not able to be inferred. |
java.lang.String |
getIncompatibleGlobalWindowErrorMessage()
Returns the error message for not supported default values in Combine.globally().
|
java.lang.reflect.TypeVariable<?> |
getInputTVariable()
Returns the
TypeVariable of InputT . |
java.lang.reflect.TypeVariable<?> |
getOutputTVariable()
Returns the
TypeVariable of OutputT . |
static <V> Combine.SimpleCombineFn<V> |
of(SerializableFunction<java.lang.Iterable<V>,V> combiner)
Deprecated.
Returns a
CombineFn that uses the given SerializableFunction to combine
values. |
addInput, compact, createAccumulator, extractOutput, getNameOverride, mergeAccumulators, of, populateDisplayData
apply, defaultValue, getInputType, getOutputType
protected SimpleCombineFn(SerializableFunction<java.lang.Iterable<V>,V> combiner)
public static <V> Combine.SimpleCombineFn<V> of(SerializableFunction<java.lang.Iterable<V>,V> combiner)
CombineFn
that uses the given SerializableFunction
to combine
values.public Coder<AccumT> getAccumulatorCoder(CoderRegistry registry, Coder<InputT> inputCoder) throws CannotProvideCoderException
CombineFnBase.GlobalCombineFn
Coder
to use for accumulator AccumT
values, or null if it is not
able to be inferred.
By default, uses the knowledge of the Coder
being used for InputT
values
and the enclosing Pipeline
's CoderRegistry
to try to infer the Coder for
AccumT
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.
getAccumulatorCoder
in interface CombineFnBase.GlobalCombineFn<InputT,AccumT,OutputT>
CannotProvideCoderException
public Coder<OutputT> getDefaultOutputCoder(CoderRegistry registry, Coder<InputT> inputCoder) throws CannotProvideCoderException
CombineFnBase.GlobalCombineFn
Coder
to use by default for output OutputT
values, or null if it
is not able to be inferred.
By default, uses the knowledge of the Coder
being used for input InputT
values and the enclosing Pipeline
's CoderRegistry
to try to infer the Coder
for OutputT
values.
getDefaultOutputCoder
in interface CombineFnBase.GlobalCombineFn<InputT,AccumT,OutputT>
CannotProvideCoderException
public java.lang.String getIncompatibleGlobalWindowErrorMessage()
CombineFnBase.GlobalCombineFn
getIncompatibleGlobalWindowErrorMessage
in interface CombineFnBase.GlobalCombineFn<InputT,AccumT,OutputT>
public java.lang.reflect.TypeVariable<?> getInputTVariable()
TypeVariable
of InputT
.public java.lang.reflect.TypeVariable<?> getAccumTVariable()
TypeVariable
of AccumT
.public java.lang.reflect.TypeVariable<?> getOutputTVariable()
TypeVariable
of OutputT
.