/** * Static method exposing the constructor. * @param value value of the new execution property. * @return the newly created execution property. */ public static DataFlowProperty of(final Value value) { return new DataFlowProperty(value); }
@Override public DAG<IRVertex, IREdge> apply(final DAG<IRVertex, IREdge> dag) { dag.getVertices().forEach(vertex -> { final List<IREdge> inEdges = dag.getIncomingEdgesOf(vertex); if (!inEdges.isEmpty()) { inEdges.forEach(edge -> { if (fromTransientToReserved(edge)) { edge.setPropertyPermanently(DataFlowProperty.of(DataFlowProperty.Value.Push)); } else { edge.setPropertyPermanently(DataFlowProperty.of(DataFlowProperty.Value.Pull)); } }); } }); return dag; } }
@Override public DAG<IRVertex, IREdge> apply(final DAG<IRVertex, IREdge> dag) { dag.getVertices().forEach(vertex -> { final List<IREdge> inEdges = dag.getIncomingEdgesOf(vertex); if (!inEdges.isEmpty()) { inEdges.forEach(edge -> { if (fromTransientToReserved(edge)) { edge.setPropertyPermanently(DataFlowProperty.of(DataFlowProperty.Value.Push)); } else { edge.setPropertyPermanently(DataFlowProperty.of(DataFlowProperty.Value.Pull)); } }); } }); return dag; } }
@Override public DAG<IRVertex, IREdge> apply(final DAG<IRVertex, IREdge> dag) { dag.getVertices().forEach(vertex -> { final List<IREdge> inEdges = dag.getIncomingEdgesOf(vertex); if (!inEdges.isEmpty()) { inEdges.forEach(edge -> { if (edge.getPropertyValue(CommunicationPatternProperty.class).get() .equals(CommunicationPatternProperty.Value.Shuffle)) { edge.setProperty(DataFlowProperty.of(DataFlowProperty.Value.Push)); } }); } }); return dag; } }
/** * Static method exposing the constructor. * @param value value of the new execution property. * @return the newly created execution property. */ public static DataFlowProperty of(final Value value) { return new DataFlowProperty(value); }
@Override public DAG<IRVertex, IREdge> apply(final DAG<IRVertex, IREdge> dag) { dag.getVertices().forEach(vertex -> { final List<IREdge> inEdges = dag.getIncomingEdgesOf(vertex); inEdges.forEach(edge -> { if (edge.getPropertyValue(CommunicationPatternProperty.class).get() .equals(CommunicationPatternProperty.Value.Shuffle)) { edge.setPropertyPermanently(DataFlowProperty.of(DataFlowProperty.Value.Push)); // Push to the merger vertex. } else { edge.setPropertyPermanently(DataFlowProperty.of(DataFlowProperty.Value.Pull)); } }); }); return dag; } }
@Override public DAG<IRVertex, IREdge> apply(final DAG<IRVertex, IREdge> dag) { dag.getVertices().forEach(vertex -> { final List<IREdge> inEdges = dag.getIncomingEdgesOf(vertex); inEdges.forEach(edge -> { if (edge.getPropertyValue(CommunicationPatternProperty.class).get() .equals(CommunicationPatternProperty.Value.Shuffle)) { edge.setPropertyPermanently(DataFlowProperty.of(DataFlowProperty.Value.Push)); // Push to the merger vertex. } else { edge.setPropertyPermanently(DataFlowProperty.of(DataFlowProperty.Value.Pull)); } }); }); return dag; } }
@Override public DAG<IRVertex, IREdge> apply(final DAG<IRVertex, IREdge> dag) { dag.getVertices().forEach(vertex -> { final List<IREdge> inEdges = dag.getIncomingEdgesOf(vertex); if (!inEdges.isEmpty()) { inEdges.forEach(edge -> { if (edge.getPropertyValue(CommunicationPatternProperty.class).get() .equals(CommunicationPatternProperty.Value.Shuffle)) { edge.setProperty(DataFlowProperty.of(DataFlowProperty.Value.Push)); } }); } }); return dag; } }
newEdge.setProperty(DataStoreProperty.of(DataStoreProperty.Value.LocalFileStore)); newEdge.setProperty(DataPersistenceProperty.of(DataPersistenceProperty.Value.Keep)); newEdge.setProperty(DataFlowProperty.of(DataFlowProperty.Value.Push)); newEdge.setProperty(KeyExtractorProperty.of(new PairKeyExtractor())); newEdge.setProperty(AdditionalOutputTagProperty.of(ADDITIONAL_OUTPUT_TAG));
newEdge.setProperty(DataStoreProperty.of(DataStoreProperty.Value.LocalFileStore)); newEdge.setProperty(DataPersistenceProperty.of(DataPersistenceProperty.Value.Keep)); newEdge.setProperty(DataFlowProperty.of(DataFlowProperty.Value.Pull)); newEdge.setProperty(KeyExtractorProperty.of(new PairKeyExtractor())); newEdge.setProperty(AdditionalOutputTagProperty.of(ADDITIONAL_OUTPUT_TAG));
final ExecutionPropertyMap<EdgeExecutionProperty> map = new ExecutionPropertyMap<>(irEdge.getId()); map.put(CommunicationPatternProperty.of(commPattern)); map.put(DataFlowProperty.of(DataFlowProperty.Value.Pull)); map.put(EncoderProperty.of(EncoderFactory.DUMMY_ENCODER_FACTORY)); map.put(DecoderProperty.of(DecoderFactory.DUMMY_DECODER_FACTORY));
final ExecutionPropertyMap<EdgeExecutionProperty> map = new ExecutionPropertyMap<>(irEdge.getId()); map.put(CommunicationPatternProperty.of(commPattern)); map.put(DataFlowProperty.of(DataFlowProperty.Value.Pull)); map.put(EncoderProperty.of(EncoderFactory.DUMMY_ENCODER_FACTORY)); map.put(DecoderProperty.of(DecoderFactory.DUMMY_DECODER_FACTORY));