Class LazyAggregateCombineFn<InputT,​AccumT,​OutputT>

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<InputT,​AccumT,​OutputT>, org.apache.beam.sdk.transforms.display.HasDisplayData

    public class LazyAggregateCombineFn<InputT,​AccumT,​OutputT>
    extends org.apache.beam.sdk.transforms.Combine.CombineFn<InputT,​AccumT,​OutputT>
    Combine.CombineFn that wraps an AggregateFn. The AggregateFn is lazily instantiated so it doesn't have to be serialized/deserialized.
    See Also:
    Serialized Form
    • Constructor Detail

      • LazyAggregateCombineFn

        public LazyAggregateCombineFn​(java.util.List<java.lang.String> functionPath,
                                      java.lang.String jarPath)
    • Method Detail

      • createAccumulator

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

        public AccumT addInput​(AccumT mutableAccumulator,
                               InputT input)
        Specified by:
        addInput in class org.apache.beam.sdk.transforms.Combine.CombineFn<InputT,​AccumT,​OutputT>
      • mergeAccumulators

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

        public OutputT extractOutput​(AccumT accumulator)
        Specified by:
        extractOutput in class org.apache.beam.sdk.transforms.Combine.CombineFn<InputT,​AccumT,​OutputT>
      • 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
        Specified by:
        getAccumulatorCoder in interface org.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<InputT,​AccumT,​OutputT>
        Throws:
        org.apache.beam.sdk.coders.CannotProvideCoderException
      • getAccumTVariable

        public java.lang.reflect.TypeVariable<?> getAccumTVariable()
      • getUdafImpl

        public UdafImpl getUdafImpl()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getDefaultOutputCoder

        public org.apache.beam.sdk.coders.Coder<OutputT> getDefaultOutputCoder​(org.apache.beam.sdk.coders.CoderRegistry arg0,
                                                                               org.apache.beam.sdk.coders.Coder<@UnknownKeyFor @NonNull @Initialized 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()
      • 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