@Override public DAG<IRVertex, IREdge> apply(final DAG<IRVertex, IREdge> dag) { dag.topologicalDo(v -> { // we only care about metric collection vertices. if (v instanceof OperatorVertex && ((OperatorVertex) v).getTransform() instanceof MetricCollectTransform) { dag.getOutgoingEdgesOf(v).forEach(edge -> { // double checking. if (edge.getPropertyValue(CommunicationPatternProperty.class).get() .equals(CommunicationPatternProperty.Value.Shuffle)) { edge.setPropertyPermanently(MetricCollectionProperty.of( MetricCollectionProperty.Value.DataSkewRuntimePass)); } }); } }); return dag; } }
new IREdge(edge.getPropertyValue(CommunicationPatternProperty.class).get(), edge.getSrc(), v); edge.copyExecutionPropertiesTo(edgeToOriginalDstV); edgeToOriginalDstV.setPropertyPermanently(MetricCollectionProperty.of(metricCollectionId)); edgeToABV.setPropertyPermanently(MetricCollectionProperty.of(metricCollectionId));