eaglewatcherwb commented on a change in pull request #8603: 
[FLINK-12608][runtime] Add getVertexOrThrow and
URL: https://github.com/apache/flink/pull/8603#discussion_r290615331
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/strategy/SchedulingTopology.java
 ##########
 @@ -43,11 +43,27 @@
         */
        Optional<SchedulingExecutionVertex> getVertex(ExecutionVertexID 
executionVertexId);
 
+       /**
+        * Looks up the {@link SchedulingExecutionVertex} for the given {@link 
ExecutionVertexID}.
+        *
+        * @param executionVertexId identifying the respective scheduling vertex
+        * @return The respective scheduling vertex or throw {@link Exception} 
if the vertex does not exist
+        */
+       SchedulingExecutionVertex getVertexOrThrow(ExecutionVertexID 
executionVertexId);
 
 Review comment:
   Emm, `default` is a good way to add new method in interfaces, since in some 
user cases it is not easy to add corresponding method in the existing 
implementations. But using `default` may have the risk of `existing 
implementations of an interface may compile without error or warning but fail 
at runtime` (as Item 21 in Effective Java), thus I prefer not to use `default` 
as far as possible.
   Anyway, thanks a lot for providing this `default` proposal. 

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