sanha commented on a change in pull request #115: [NEMO-96] Modularize 
DataSkewPolicy to use MetricVertex and BarrierVertex
URL: https://github.com/apache/incubator-nemo/pull/115#discussion_r214380077
 
 

 ##########
 File path: 
common/src/main/java/edu/snu/nemo/common/ir/vertex/AggregationBarrierVertex.java
 ##########
 @@ -15,55 +15,48 @@
  */
 package edu.snu.nemo.common.ir.vertex;
 
+import edu.snu.nemo.common.Pair;
 import edu.snu.nemo.common.dag.DAG;
 import edu.snu.nemo.common.exception.DynamicOptimizationException;
 import edu.snu.nemo.common.ir.edge.IREdge;
+import edu.snu.nemo.common.ir.vertex.transform.AggregateMetricTransform;
+import edu.snu.nemo.common.ir.vertex.transform.Transform;
 
-import java.util.*;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * IRVertex that collects statistics to send them to the optimizer for dynamic 
optimization.
  * This class is generated in the DAG through
  * 
{edu.snu.nemo.compiler.optimizer.pass.compiletime.composite.DataSkewCompositePass}.
- * @param <K> type of the key of metric data.
- * @param <V> type of the value of metric data.
  */
-public final class MetricCollectionBarrierVertex<K, V> extends IRVertex {
-  // Metric data used for dynamic optimization.
-  private Map<K, V> metricData;
-  private final List<String> blockIds;
-
+public final class AggregationBarrierVertex extends IRVertex {
   // This DAG snapshot is taken at the end of the DataSkewCompositePass, for 
the vertex to know the state of the DAG at
   // its optimization, and to be able to figure out exactly where in the DAG 
the vertex exists.
+  private final Transform transform;
   private DAG<IRVertex, IREdge> dagSnapshot;
 
 Review comment:
   Why do we need this snapshot? If it is not needed, please remove it.
   If it is needed, let's think about another way. It seems that having a 
snapshot of IRDAG in an `IRVertex` is not a good design.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to