stratosphere/stratosphere — pull request #677 by skunert (2014-04-10 12:17:15+00:00)
Title: New Annotations for JAPI.

Annotations for the new API were implemented. There is now a sepparate FunctionAnnotation class for the new japi because the code is much more different than the code for the record API. The annotations also have new features. It is now possible to specify which field of the input is copied where.

___Example:___

@ConstantFields(inTuplePos={0,1,2}, outTuplePos={2,0,1})

The example specifies that three fields of the input are copied but are on a different position in the output. At the moment, this only works for tuples. If only the input positions are specified, it is assumed that the position of the specified fields remains the same. If a udf has other input and output, the annotations are ignored. Nevertheless, there is already some infrastructure for future work. You can annotate like this:

@ConstantFields(inCustomPos={"Field1", "Field2"}, outCustomPos={"Field2", "Field1"})

It is also now possible to hand semanticproperties to the operators themselves via the ```withSemanticProperties()``` method.