nemo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] wonook commented on a change in pull request #190: [NEMO-328] Refactor IRDAG
Date Thu, 31 Jan 2019 06:04:30 GMT
wonook commented on a change in pull request #190: [NEMO-328] Refactor IRDAG
URL: https://github.com/apache/incubator-nemo/pull/190#discussion_r252543769
 
 

 ##########
 File path: common/src/main/java/org/apache/nemo/common/ir/IRDAG.java
 ##########
 @@ -0,0 +1,384 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.nemo.common.ir;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import org.apache.nemo.common.KeyExtractor;
+import org.apache.nemo.common.Pair;
+import org.apache.nemo.common.dag.DAG;
+import org.apache.nemo.common.dag.DAGBuilder;
+import org.apache.nemo.common.dag.DAGQueryInterface;
+import org.apache.nemo.common.exception.IllegalEdgeOperationException;
+import org.apache.nemo.common.ir.edge.IREdge;
+import org.apache.nemo.common.ir.edge.executionproperty.*;
+import org.apache.nemo.common.ir.vertex.IRVertex;
+import org.apache.nemo.common.ir.vertex.LoopVertex;
+import org.apache.nemo.common.ir.vertex.system.MessageAggregatorVertex;
+import org.apache.nemo.common.ir.vertex.system.MessageBarrierVertex;
+import org.apache.nemo.common.ir.vertex.system.StreamVertex;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.BiFunction;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+/**
+ * An IRDAG object captures a high-level data processing application (e.g., Spark/Beam application).
+ * - IRVertex: A data-parallel operation. (e.g., map)
+ * - IREdge: A data dependency between two operations. (e.g., shuffle)
+ *
+ * Largely two types of IRDAG optimization(modification) methods are provided.
+ * All of these methods preserve application semantics.
+ * - Annotation: setProperty(), getPropertyValue() on each IRVertex/IREdge
+ * - Reshaping: insert(), delete() on the IRDAG
+ */
+public final class IRDAG implements DAGQueryInterface<IRVertex, IREdge> {
+  private static final Logger LOG = LoggerFactory.getLogger(IRDAG.class.getName());
+
+  private final AtomicInteger metricCollectionId;
+
+  private DAG<IRVertex, IREdge> lastSnapshotDAG; // the DAG that was saved most recently.
+  private DAG<IRVertex, IREdge> updatingDAG; // the DAG that is being updated.
 
 Review comment:
   `dagSnapshot` and`modifiedDAG`?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message