You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nemo.apache.org by GitBox <gi...@apache.org> on 2018/10/25 01:36:32 UTC

[GitHub] johnyangk commented on a change in pull request #128: [NEMO-235] Refactor TaskExecutor's data processing logic

johnyangk commented on a change in pull request #128: [NEMO-235] Refactor TaskExecutor's data processing logic
URL: https://github.com/apache/incubator-nemo/pull/128#discussion_r228011057
 
 

 ##########
 File path: runtime/executor/src/main/java/org/apache/nemo/runtime/executor/datatransfer/OutputCollectorImpl.java
 ##########
 @@ -15,119 +15,85 @@
  */
 package org.apache.nemo.runtime.executor.datatransfer;
 
-import org.apache.nemo.common.Pair;
 import org.apache.nemo.common.ir.OutputCollector;
+import org.apache.nemo.common.ir.vertex.IRVertex;
+import org.apache.nemo.common.ir.vertex.OperatorVertex;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.util.*;
 
 /**
  * OutputCollector implementation.
+ * This emits four types of outputs
+ * 1) internal main outputs: this output becomes the input of internal Transforms
+ * 2) internal additional outputs: this additional output becomes the input of internal Transforms
+ * 3) external main outputs: this external output is emitted to OutputWriter
+ * 4) external additional outputs: this external output is emitted to OutputWriter
  *
  * @param <O> output type.
  */
 public final class OutputCollectorImpl<O> implements OutputCollector<O> {
   private static final Logger LOG = LoggerFactory.getLogger(OutputCollectorImpl.class.getName());
-  private final Set<String> mainTagOutputChildren;
-  // Use ArrayList (not Queue) to allow 'null' values
-  private final ArrayList<O> mainTagElements;
-  // Key: Pair of tag and destination vertex id
-  // Value: data elements which will be input to the tagged destination vertex
-  private final Map<Pair<String, String>, ArrayList<Object>> additionalTaggedChildToElementsMap;
+
+  private final IRVertex irVertex;
+  private final Set<OperatorVertex> internalMainOutputs;
 
 Review comment:
   For this variable, and the following 3 variables, change the types
   
   Set-OperatorVertex -> ArrayList-OperatorVertex
   Set-OutputWriter -> ArrayList-OutputWriter
   
   since lists are faster to iterate?

----------------------------------------------------------------
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