Xpray commented on a change in pull request #8346: [FLINK-12405] [DataSet] 
Introduce BLOCKING_PERSISTENT result partition type
URL: https://github.com/apache/flink/pull/8346#discussion_r286394267
 
 

 ##########
 File path: 
flink-optimizer/src/main/java/org/apache/flink/optimizer/plantranslate/JobGraphGenerator.java
 ##########
 @@ -480,6 +482,32 @@ public void postVisit(PlanNode node) {
                        if (node instanceof SourcePlanNode || node instanceof 
NAryUnionPlanNode || node instanceof SolutionSetPlanNode) {
                                return;
                        }
+
+                       // if this is a blocking shuffle vertex, we add one 
IntermediateDataSetID to its predecessor and return
+                       if (node instanceof SinkPlanNode) {
+                               Object userCodeObject = 
node.getProgramOperator().getUserCodeWrapper().getUserCodeObject();
+                               if (userCodeObject instanceof 
BlockingShuffleOutputFormat) {
+                                       PlanNode precedentNode = 
node.getInputs().iterator().next().getSource();
+                                       JobVertex precedentVertex;
+                                       if 
(this.vertices.containsKey(precedentNode)) {
 
 Review comment:
   I found ``this`` shows up all over the ``JobGraphGenerator``, maybe a 
refactor needed later.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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