public static class Max.MaxLongFn extends Combine.BinaryCombineLongFn implements org.apache.beam.sdk.util.common.CounterProvider<Long>
CombineFn that computes the maximum of a collection of Longs, useful as an
argument to Combine.globally(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>) or Combine.perKey(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>).| Constructor and Description |
|---|
MaxLongFn() |
| Modifier and Type | Method and Description |
|---|---|
long |
apply(long left,
long right)
Applies the binary operation to the two operands, returning the result.
|
TypeVariable<?> |
getAccumTVariable()
Returns the
TypeVariable of AccumT. |
org.apache.beam.sdk.util.common.Counter<Long> |
getCounter(String name) |
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. |
long |
identity()
Returns the identity element of this operation, i.e.
|
void |
populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.
|
addInput, createAccumulator, extractOutput, getAccumulatorCoder, getDefaultOutputCoder, mergeAccumulatorsapply, asKeyedFn, compact, defaultValue, getOutputTypepublic long apply(long left,
long right)
Combine.BinaryCombineLongFnapply in class Combine.BinaryCombineLongFnpublic long identity()
Combine.BinaryCombineLongFne
such that apply(e, x) == apply(x, e) == x for all values of x.identity in class Combine.BinaryCombineLongFnpublic org.apache.beam.sdk.util.common.Counter<Long> getCounter(String name)
getCounter in interface org.apache.beam.sdk.util.common.CounterProvider<Long>getCounter in class Combine.BinaryCombineLongFnpublic String getIncompatibleGlobalWindowErrorMessage()
CombineFnBase.GlobalCombineFngetIncompatibleGlobalWindowErrorMessage in interface CombineFnBase.GlobalCombineFn<InputT,AccumT,OutputT>public TypeVariable<?> getInputTVariable()
TypeVariable of InputT.public TypeVariable<?> getAccumTVariable()
TypeVariable of AccumT.public TypeVariable<?> getOutputTVariable()
TypeVariable of OutputT.public void populateDisplayData(DisplayData.Builder builder)
populateDisplayData(DisplayData.Builder) is invoked by Pipeline runners to collect
display data via DisplayData.from(HasDisplayData). Implementations may call
super.populateDisplayData(builder) in order to register display data in the current
namespace, but should otherwise use subcomponent.populateDisplayData(builder) to use
the namespace of the subcomponent.
By default, does not register any display data. Implementors may override this method to provide their own display data.
populateDisplayData in interface HasDisplayDatabuilder - The builder to populate with display data.HasDisplayData