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_r342117893
 
 

 ##########
 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();
 
 Review comment:
   It is what was set into StreamNode, can be specified by users or generated 
by default(in `StreamGraphGenerator#determineSlotSharingGroup`).
   Given that there is only one such key in this code context, the name 
`slotSharingGroupKey` shall not cause confusion.
   Not sure if I understand the question correctly?

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