InputT
- type of input valuesAccumT
- type of mutable accumulator valuesOutputT
- type of output values@Internal public static interface CombineFnBase.GlobalCombineFn<InputT,AccumT,OutputT> extends java.io.Serializable, HasDisplayData
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.
Modifier and Type | Method and Description |
---|---|
OutputT |
defaultValue()
Returns the default value when there are no values added to the accumulator.
|
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().
|
populateDisplayData
Coder<AccumT> getAccumulatorCoder(CoderRegistry registry, Coder<InputT> inputCoder) throws CannotProvideCoderException
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.
CannotProvideCoderException
Coder<OutputT> getDefaultOutputCoder(CoderRegistry registry, Coder<InputT> inputCoder) throws CannotProvideCoderException
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.
CannotProvideCoderException
java.lang.String getIncompatibleGlobalWindowErrorMessage()
OutputT defaultValue()