@Deprecated public class FunctionAnnotation extends Object
Be aware that some annotations should only be used for functions with as single input (\@ConstantFieldsExcept(fields={2}) public class MyMapper extends MapFunction { public void map(Record record, Collector out) { int value = record.getField(2, IntValue.class).getValue(); record.setField(2, new IntValue(Math.abs(value))); out.collect(record); } }
MapFunction, ReduceFunction) and some only for stubs with two inputs
(CrossFunction, JoinFunction, CoGroupFunction).| Modifier and Type | Class and Description |
|---|---|
static interface |
FunctionAnnotation.AllFieldsConstants
Deprecated.
Specifies that all fields of an input record that are unchanged in the output of
a
MapFunction, or ReduceFunction). |
static interface |
FunctionAnnotation.ConstantFields
Deprecated.
Specifies the fields of an input record that are unchanged in the output of
a stub with a single input (
MapFunction, ReduceFunction). |
static interface |
FunctionAnnotation.ConstantFieldsExcept
Deprecated.
Specifies the fields of an input record that are changed in the output of
a stub with a single input (
MapFunction, ReduceFunction). |
static interface |
FunctionAnnotation.ConstantFieldsFirst
Deprecated.
Specifies the fields of an input record of the first input that are unchanged in
the output of a stub with two inputs (
CrossFunction, JoinFunction, CoGroupFunction)
A field is considered to be constant if its value is not changed and copied to the same position of
output record. |
static interface |
FunctionAnnotation.ConstantFieldsFirstExcept
Deprecated.
Specifies the fields of an input record of the first input that are changed in
the output of a stub with two inputs (
CrossFunction, JoinFunction, CoGroupFunction)
All other fields are assumed to be constant. |
static interface |
FunctionAnnotation.ConstantFieldsSecond
Deprecated.
Specifies the fields of an input record of the second input that are unchanged in
the output of a stub with two inputs (
CrossFunction, JoinFunction, CoGroupFunction)
A field is considered to be constant if its value is not changed and copied to the same position of
output record. |
static interface |
FunctionAnnotation.ConstantFieldsSecondExcept
Deprecated.
Specifies the fields of an input record of the second input that are changed in
the output of a stub with two inputs (
CrossFunction, JoinFunction, CoGroupFunction)
All other fields are assumed to be constant. |
| Modifier and Type | Method and Description |
|---|---|
static DualInputSemanticProperties |
readDualConstantAnnotations(UserCodeWrapper<?> udf)
Deprecated.
|
static SingleInputSemanticProperties |
readSingleConstantAnnotations(UserCodeWrapper<?> udf)
Deprecated.
|
public static SingleInputSemanticProperties readSingleConstantAnnotations(UserCodeWrapper<?> udf)
public static DualInputSemanticProperties readDualConstantAnnotations(UserCodeWrapper<?> udf)
Copyright © 2015 The Apache Software Foundation. All rights reserved.