You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/01/13 07:37:06 UTC

[GitHub] [flink] rmetzger commented on a change in pull request #14584: [FLINK-20850][runtime] Removing usage of CoLocationConstraints

rmetzger commented on a change in pull request #14584:
URL: https://github.com/apache/flink/pull/14584#discussion_r556306735



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobVertex.java
##########
@@ -425,12 +426,12 @@ public void setStrictlyCoLocatedWith(JobVertex strictlyCoLocatedWith) {
                     "Strict co-location requires that both vertices are in the same slot sharing group.");
         }
 
-        CoLocationGroup thisGroup = this.coLocationGroup;
-        CoLocationGroup otherGroup = strictlyCoLocatedWith.coLocationGroup;
+        CoLocationGroupImpl thisGroup = this.coLocationGroup;
+        CoLocationGroupImpl otherGroup = strictlyCoLocatedWith.coLocationGroup;

Review comment:
       Wouldn't it be cleaner to add the `addVertex()` method to the `CoLocationGroup` interface?

##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
##########
@@ -1018,10 +1018,10 @@ private void setCoLocation() {
                             "Cannot use a co-location constraint without a slot sharing group");
                 }
 
-                Tuple2<SlotSharingGroup, CoLocationGroup> constraint =
+                Tuple2<SlotSharingGroup, CoLocationGroupImpl> constraint =
                         coLocationGroups.computeIfAbsent(
                                 coLocationGroupKey,
-                                k -> new Tuple2<>(sharingGroup, new CoLocationGroup()));
+                                k -> new Tuple2<>(sharingGroup, new CoLocationGroupImpl()));

Review comment:
       Adding the addVertex method to the interface would not require touching this test




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