readFirst = ((ReadFieldsFirst) ann).value(); } else if (ann instanceof ReadFieldsSecond) { readSecond = ((ReadFieldsSecond) ann).value(); } else if (ann instanceof ForwardedFields || ann instanceof NonForwardedFields || ann instanceof ReadFields) { throw new InvalidSemanticAnnotationException("Annotation " + ann.getClass() + " invalid for dual input function.");
@FunctionAnnotation.ReadFieldsSecond("f0") public class UpdateVertexMapping<K> extends UpdateMapping<K>
@FunctionAnnotation.ReadFieldsSecond("f0;f2") @FunctionAnnotation.ForwardedFieldsFirst("f1.f0") @FunctionAnnotation.ForwardedFieldsSecond("f2->f0")
@FunctionAnnotation.ReadFieldsSecond("f0;f2") @FunctionAnnotation.ForwardedFieldsFirst("f1.f0") @FunctionAnnotation.ForwardedFieldsSecond("f2->f0")
@FunctionAnnotation.ReadFieldsSecond("f0") public class UpdateVertexMapping<K> extends UpdateMapping<K>
@FunctionAnnotation.ReadFieldsSecond("f1; f2") public class CreateExpandEmbedding extends RichFlatJoinFunction<Embedding, EdgeWithTiePoint, ExpandEmbedding> {
@FunctionAnnotation.ReadFieldsSecond("f1; f2") public class CreateExpandEmbedding extends RichFlatJoinFunction<Embedding, EdgeWithTiePoint, ExpandEmbedding> {
readFirst = ((ReadFieldsFirst) ann).value(); } else if (ann instanceof ReadFieldsSecond) { readSecond = ((ReadFieldsSecond) ann).value(); } else if (ann instanceof ForwardedFields || ann instanceof NonForwardedFields || ann instanceof ReadFields) { throw new InvalidSemanticAnnotationException("Annotation " + ann.getClass() + " invalid for dual input function.");
readFirst = ((ReadFieldsFirst) ann).value(); } else if (ann instanceof ReadFieldsSecond) { readSecond = ((ReadFieldsSecond) ann).value(); } else if (ann instanceof ForwardedFields || ann instanceof NonForwardedFields || ann instanceof ReadFields) { throw new InvalidSemanticAnnotationException("Annotation " + ann.getClass() + " invalid for dual input function.");
@FunctionAnnotation.ReadFieldsSecond("f0") public class CoGroupAssociateOldVerticesWithNewIds implements CoGroupFunction<Tuple2<Vertex, GradoopId>, Tuple2<Vertex, GradoopId>, Tuple2<Vertex, GradoopId>> {
@FunctionAnnotation.ReadFieldsSecond("f0") public class CoGroupAssociateOldVerticesWithNewIds implements CoGroupFunction<Tuple2<Vertex, GradoopId>, Tuple2<Vertex, GradoopId>, Tuple2<Vertex, GradoopId>> {
@FunctionAnnotation.ReadFieldsSecond("properties") public class EdgeSourceVertexJoin implements JoinFunction<Edge, Vertex, Tuple3<Edge, GradoopId, Boolean>> {
@FunctionAnnotation.ReadFieldsSecond("properties") public class EdgeSourceVertexJoin implements JoinFunction<Edge, Vertex, Tuple3<Edge, GradoopId, Boolean>> {
@FunctionAnnotation.ReadFieldsSecond("properties") public class EdgeTargetVertexJoin implements JoinFunction<Tuple3<Edge, GradoopId, Boolean>, Vertex, Tuple3<Edge, Boolean, Boolean>> {
@FunctionAnnotation.ReadFieldsSecond("properties") public class EdgeTargetVertexJoin implements JoinFunction<Tuple3<Edge, GradoopId, Boolean>, Vertex, Tuple3<Edge, Boolean, Boolean>> {
/** * Adds new graph ids to the initial vertex set * * @param <V> EPGM vertex type */ @FunctionAnnotation.ReadFieldsFirst("graphIds") @FunctionAnnotation.ReadFieldsSecond("f1") public class AddNewGraphsToVertex<V extends Vertex> implements JoinFunction<V, Tuple2<GradoopId, GradoopIdSet>, V> { /** * {@inheritDoc} */ @Override public V join(V vertex, Tuple2<GradoopId, GradoopIdSet> vertexWithGraphIds) { vertex.getGraphIds().addAll(vertexWithGraphIds.f1); return vertex; } }
/** * Adds new graph ids to the initial vertex set * * @param <V> EPGM vertex type */ @FunctionAnnotation.ReadFieldsFirst("graphIds") @FunctionAnnotation.ReadFieldsSecond("f1") public class AddNewGraphsToVertex<V extends Vertex> implements JoinFunction<V, Tuple2<GradoopId, GradoopIdSet>, V> { @Override public V join(V vertex, Tuple2<GradoopId, GradoopIdSet> vertexWithGraphIds) { vertex.getGraphIds().addAll(vertexWithGraphIds.f1); return vertex; } }
/** * (object,count1),(object,count2) -> (object,count1 + count2) * * @param <T> object type */ @FunctionAnnotation.ForwardedFieldsFirst("f0") @FunctionAnnotation.ReadFieldsSecond("f1") public class SumCounts<T> implements JoinFunction<WithCount<T>, WithCount<T>, WithCount<T>> { @Override public WithCount<T> join(WithCount<T> first, WithCount<T> second) throws Exception { first.setCount(first.getCount() + second.getCount()); return first; } }
/** * (object,count1),(object,count2) -> (object,count1 + count2) * * @param <T> object type */ @FunctionAnnotation.ForwardedFieldsFirst("f0") @FunctionAnnotation.ReadFieldsSecond("f1") public class SumCounts<T> implements JoinFunction<WithCount<T>, WithCount<T>, WithCount<T>> { @Override public WithCount<T> join(WithCount<T> first, WithCount<T> second) throws Exception { first.setCount(first.getCount() + second.getCount()); return first; } }
@FunctionAnnotation.ForwardedFieldsFirst("0->4;1;1->3") @FunctionAnnotation.ForwardedFieldsSecond("2;4->0") @FunctionAnnotation.ReadFieldsFirst("0;2;4") @FunctionAnnotation.ReadFieldsSecond("1;3") private static class DummyTestJoinFunction1 implements JoinFunction<Tuple5<Integer, Long, String, Long, Integer>, Tuple5<Integer, Long, String, Long, Integer>, Tuple5<Integer, Long, String, Long, Integer>> { @Override public Tuple5<Integer, Long, String, Long, Integer> join( Tuple5<Integer, Long, String, Long, Integer> first, Tuple5<Integer, Long, String, Long, Integer> second) throws Exception { return new Tuple5<Integer, Long, String, Long, Integer>(); } }