Class PartialCombineFn<InputT,AccumT>
- java.lang.Object
-
- org.apache.beam.sdk.transforms.Combine.CombineFn<InputT,AccumT,AccumT>
-
- org.apache.nemo.compiler.frontend.beam.transform.PartialCombineFn<InputT,AccumT>
-
- Type Parameters:
InputT
- input typeAccumT
- accumulator type
- All Implemented Interfaces:
java.io.Serializable
,org.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<InputT,AccumT,AccumT>
,org.apache.beam.sdk.transforms.display.HasDisplayData
public final class PartialCombineFn<InputT,AccumT> extends org.apache.beam.sdk.transforms.Combine.CombineFn<InputT,AccumT,AccumT>
Wrapper class forCombine.CombineFn
. When invoked to output, it outputs its accumulator, instead of the output from its original combine function.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PartialCombineFn(org.apache.beam.sdk.transforms.Combine.CombineFn<InputT,AccumT,?> originFn, org.apache.beam.sdk.coders.Coder<AccumT> accumCoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccumT
addInput(AccumT accumulator, InputT input)
AccumT
createAccumulator()
AccumT
extractOutput(AccumT accumulator)
java.lang.reflect.TypeVariable<?>
getAccumTVariable()
org.apache.beam.sdk.coders.Coder<AccumT>
getAccumulatorCoder(org.apache.beam.sdk.coders.CoderRegistry registry, org.apache.beam.sdk.coders.Coder<InputT> inputCoder)
org.apache.beam.sdk.coders.Coder<OutputT>
getDefaultOutputCoder(org.apache.beam.sdk.coders.CoderRegistry arg0, org.apache.beam.sdk.coders.Coder<InputT> arg1)
java.lang.String
getIncompatibleGlobalWindowErrorMessage()
java.lang.reflect.TypeVariable<?>
getInputTVariable()
java.lang.reflect.TypeVariable<?>
getOutputTVariable()
AccumT
mergeAccumulators(java.lang.Iterable<AccumT> accumulators)
void
populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder arg0)
-
-
-
Method Detail
-
createAccumulator
public AccumT createAccumulator()
-
getAccumulatorCoder
public org.apache.beam.sdk.coders.Coder<AccumT> getAccumulatorCoder(org.apache.beam.sdk.coders.CoderRegistry registry, org.apache.beam.sdk.coders.Coder<InputT> inputCoder) throws org.apache.beam.sdk.coders.CannotProvideCoderException
-
getDefaultOutputCoder
public org.apache.beam.sdk.coders.Coder<OutputT> getDefaultOutputCoder(org.apache.beam.sdk.coders.CoderRegistry arg0, org.apache.beam.sdk.coders.Coder<InputT> arg1) throws org.apache.beam.sdk.coders.CannotProvideCoderException
- Specified by:
getDefaultOutputCoder
in interfaceorg.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<InputT extends java.lang.Object,AccumT extends java.lang.Object,OutputT extends java.lang.Object>
- Throws:
org.apache.beam.sdk.coders.CannotProvideCoderException
-
getIncompatibleGlobalWindowErrorMessage
public java.lang.String getIncompatibleGlobalWindowErrorMessage()
- Specified by:
getIncompatibleGlobalWindowErrorMessage
in interfaceorg.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<InputT extends java.lang.Object,AccumT extends java.lang.Object,OutputT extends java.lang.Object>
-
getInputTVariable
public java.lang.reflect.TypeVariable<?> getInputTVariable()
-
getAccumTVariable
public java.lang.reflect.TypeVariable<?> getAccumTVariable()
-
getOutputTVariable
public java.lang.reflect.TypeVariable<?> getOutputTVariable()
-
populateDisplayData
public void populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder arg0)
- Specified by:
populateDisplayData
in interfaceorg.apache.beam.sdk.transforms.display.HasDisplayData
-
-