Class FinalCombineFn<AccumT,​Output>

  • Type Parameters:
    AccumT - accumulator type
    Output - output type
    All Implemented Interfaces:
    java.io.Serializable, org.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<AccumT,​AccumT,​Output>, org.apache.beam.sdk.transforms.display.HasDisplayData

    public final class FinalCombineFn<AccumT,​Output>
    extends org.apache.beam.sdk.transforms.Combine.CombineFn<AccumT,​AccumT,​Output>
    Wrapper class for Combine.CombineFn. When adding input, it merges its accumulator and input accumulator into a single accumulator.
    See Also:
    Serialized Form
    • Constructor Detail

      • FinalCombineFn

        public FinalCombineFn​(org.apache.beam.sdk.transforms.Combine.CombineFn<?,​AccumT,​Output> originFn,
                              org.apache.beam.sdk.coders.Coder<AccumT> accumCoder)
    • Method Detail

      • createAccumulator

        public AccumT createAccumulator()
        Specified by:
        createAccumulator in class org.apache.beam.sdk.transforms.Combine.CombineFn<AccumT,​AccumT,​Output>
      • addInput

        public AccumT addInput​(AccumT accumulator,
                               AccumT input)
        Specified by:
        addInput in class org.apache.beam.sdk.transforms.Combine.CombineFn<AccumT,​AccumT,​Output>
      • getAccumulatorCoder

        public org.apache.beam.sdk.coders.Coder<AccumT> getAccumulatorCoder​(org.apache.beam.sdk.coders.CoderRegistry registry,
                                                                            org.apache.beam.sdk.coders.Coder<AccumT> ac)
        Specified by:
        getAccumulatorCoder in interface org.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<AccumT,​AccumT,​Output>
      • mergeAccumulators

        public AccumT mergeAccumulators​(java.lang.Iterable<AccumT> accumulators)
        Specified by:
        mergeAccumulators in class org.apache.beam.sdk.transforms.Combine.CombineFn<AccumT,​AccumT,​Output>
      • extractOutput

        public Output extractOutput​(AccumT accumulator)
        Specified by:
        extractOutput in class org.apache.beam.sdk.transforms.Combine.CombineFn<AccumT,​AccumT,​Output>
      • 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 interface org.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 interface org.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 interface org.apache.beam.sdk.transforms.display.HasDisplayData