johnyangk commented on a change in pull request #196: [NEMO-253] Refactor 
getInternal(Main/Additional)OutputMap in TaskExecutor
URL: https://github.com/apache/incubator-nemo/pull/196#discussion_r260591708
 
 

 ##########
 File path: 
runtime/executor/src/main/java/org/apache/nemo/runtime/executor/task/TaskExecutor.java
 ##########
 @@ -213,13 +213,18 @@ public TaskExecutor(final Task task,
 
       // Additional outputs
       final Map<String, List<NextIntraTaskOperatorInfo>> 
internalAdditionalOutputMap =
-        getInternalAdditionalOutputMap(irVertex, irVertexDag, edgeIndexMap, 
operatorWatermarkManagerMap);
+        getInternalOutputMap(irVertex, irVertexDag, edgeIndexMap, 
operatorWatermarkManagerMap);
       final Map<String, List<OutputWriter>> externalAdditionalOutputMap =
         getExternalAdditionalOutputMap(irVertex, task.getTaskOutgoingEdges(), 
intermediateDataIOFactory);
 
       // Main outputs
-      final List<NextIntraTaskOperatorInfo> internalMainOutputs =
-        getInternalMainOutputs(irVertex, irVertexDag, edgeIndexMap, 
operatorWatermarkManagerMap);
+      final List<NextIntraTaskOperatorInfo> internalMainOutputs;
+      final String key = "main";
 
 Review comment:
   How about moving this into `AdditionalOutputTagProperty` as a public static 
variable, to ensure there's only a single value for the main output tag? This 
also has the performance benefit of caching the result of hashCode() and 
reusing it across all task executions in the executor.
   
   Can you also add a TODO in the comment for the JIRA I've just created? It 
has become more clear to me after seeing this PR that it may be worthwhile to 
make the "main" tag more explicit.
   https://issues.apache.org/jira/browse/NEMO-348
   
   So I'm thinking something like the following. Let me know if you think this 
makes sense!
   ```java
   // TODO #348: Consider OutputTagProperty
   public static String MAIN_OUTPUT_TAG = "main"
   ```
   
   

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