@Target(value=TYPE) @Retention(value=RUNTIME) public static @interface FunctionAnnotation.ConstantFieldsExcept
RichMapFunction
, RichReduceFunction
, or RichFlatMapFunction
.
The following example illustrates that at the example of a Map function:
\@ConstantFieldsExcept("1") public class MyMapper extends MapFunction, Tuple3 > { public Tuple3 map(Tuple3 value) { return new Tuple3 (value.f0, value.f2 / 2, value.f2); } }
The annotation takes one String array specifying the positions of the input types that do not remain constant.
When this annotation is used, it is assumed that all other values remain at the same position in input and output.
To model more complex situations use the FunctionAnnotation.ConstantFields
s annotation.
This annotation is mutually exclusive with the FunctionAnnotation.ConstantFields
annotation.
If neither this annotation, nor the FunctionAnnotation.ConstantFields
annotation are set, it is
assumed that no field in the input is forwarded/copied unmodified.
public abstract String[] value
Copyright © 2015 The Apache Software Foundation. All rights reserved.