com.google.cloud.dataflow.sdk.transforms

## Class Combine.SimpleCombineFn<V>

- java.lang.Object
- - com.google.cloud.dataflow.sdk.transforms.Combine.CombineFn<V,List<V>,V>
  - - com.google.cloud.dataflow.sdk.transforms.Combine.IterableCombineFn<V>
    - - com.google.cloud.dataflow.sdk.transforms.Combine.SimpleCombineFn<V>

All Implemented Interfaces:
  CombineFnBase.GlobalCombineFn<V,List<V>,V>, HasDisplayData, Serializable

Enclosing class:
  Combine

Deprecated.

    @Deprecated
    public static class Combine.SimpleCombineFn<V>
    extends Combine.IterableCombineFn<V>

Converts a `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).

See Also:
  Serialized Form

### Constructor Summary

Constructors
`protected` `SimpleCombineFn(SerializableFunction<Iterable<V>,V> combiner)` Deprecated.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
`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.
`String` `getIncompatibleGlobalWindowErrorMessage()` Returns the error message for not supported default values in Combine.globally().
`TypeVariable<?>` `getInputTVariable()` Returns the `TypeVariable` of `InputT`.
`TypeVariable<?>` `getOutputTVariable()` Returns the `TypeVariable` of `OutputT`.
`static <V> Combine.SimpleCombineFn<V>` `of(SerializableFunction<Iterable<V>,V> combiner)` Deprecated.

### Methods inherited from class com.google.cloud.dataflow.sdk.transforms.Combine.IterableCombineFn

`addInput, compact, createAccumulator, extractOutput, mergeAccumulators, of, populateDisplayData`

### Methods inherited from class com.google.cloud.dataflow.sdk.transforms.Combine.CombineFn

`apply, asKeyedFn, defaultValue, getOutputType`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SimpleCombineFn

    protected SimpleCombineFn(SerializableFunction<Iterable<V>,V> combiner)

Deprecated.

### Method Detail

#### of

    @Deprecated
    public static <V> Combine.SimpleCombineFn<V> of(SerializableFunction<Iterable<V>,V> combiner)

Deprecated.
Returns a `CombineFn` that uses the given `SerializableFunction` to combine values.

#### getAccumulatorCoder

    public Coder<AccumT> getAccumulatorCoder(CoderRegistry registry,
                                             Coder<InputT> inputCoder)
                                      throws CannotProvideCoderException

Description copied from interface: `CombineFnBase.GlobalCombineFn`
Returns the `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.

Specified by:
  `getAccumulatorCoder` in interface `CombineFnBase.GlobalCombineFn<InputT,AccumT,OutputT>`
Throws:
  `CannotProvideCoderException`

#### getDefaultOutputCoder

    public Coder<OutputT> getDefaultOutputCoder(CoderRegistry registry,
                                                Coder<InputT> inputCoder)
                                         throws CannotProvideCoderException

Description copied from interface: `CombineFnBase.GlobalCombineFn`
Returns the `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.

Specified by:
  `getDefaultOutputCoder` in interface `CombineFnBase.GlobalCombineFn<InputT,AccumT,OutputT>`
Throws:
  `CannotProvideCoderException`

#### getIncompatibleGlobalWindowErrorMessage

    public String getIncompatibleGlobalWindowErrorMessage()

Description copied from interface: `CombineFnBase.GlobalCombineFn`
Returns the error message for not supported default values in Combine.globally().

Specified by:
  `getIncompatibleGlobalWindowErrorMessage` in interface `CombineFnBase.GlobalCombineFn<InputT,AccumT,OutputT>`

#### getInputTVariable

    public TypeVariable<?> getInputTVariable()

Returns the `TypeVariable` of `InputT`.

#### getAccumTVariable

    public TypeVariable<?> getAccumTVariable()

Returns the `TypeVariable` of `AccumT`.

#### getOutputTVariable

    public TypeVariable<?> getOutputTVariable()

Returns the `TypeVariable` of `OutputT`.