zhuzhurk commented on a change in pull request #10007: [FLINK-14060][runtime] 
Set slot sharing groups according to logical pipelined regions
URL: https://github.com/apache/flink/pull/10007#discussion_r342112882
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
 ##########
 @@ -596,26 +600,72 @@ public static boolean isChainable(StreamEdge edge, 
StreamGraph streamGraph) {
        }
 
        private void setSlotSharingAndCoLocation() {
-               final HashMap<String, SlotSharingGroup> slotSharingGroups = new 
HashMap<>();
-               final HashMap<String, Tuple2<SlotSharingGroup, 
CoLocationGroup>> coLocationGroups = new HashMap<>();
+               setSlotSharing();
+               setCoLocation();
+       }
+
+       private void setSlotSharing() {
+               final Map<String, SlotSharingGroup> specifiedSlotSharingGroups 
= new HashMap<>();
+               final Map<JobVertexID, SlotSharingGroup> 
vertexRegionSlotSharingGroups = buildVertexRegionSlotSharingGroups();
 
                for (Entry<Integer, JobVertex> entry : jobVertices.entrySet()) {
 
-                       final StreamNode node = 
streamGraph.getStreamNode(entry.getKey());
                        final JobVertex vertex = entry.getValue();
+                       final String slotSharingGroupKey = 
streamGraph.getStreamNode(entry.getKey()).getSlotSharingGroup();
 
-                       // configure slot sharing group
-                       final String slotSharingGroupKey = 
node.getSlotSharingGroup();
                        final SlotSharingGroup sharingGroup;
 
 Review comment:
   Ok. Will take `effectiveSlotSharingGroup`.

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


With regards,
Apache Git Services

Reply via email to