AHeise commented on a change in pull request #11098: [FLINK-16060][task] 
Implement working StreamMultipleInputProcessor
URL: https://github.com/apache/flink/pull/11098#discussion_r383177132
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraph.java
 ##########
 @@ -637,19 +638,24 @@ public StreamNode getStreamNode(Integer vertexID) {
                return streamNodes.keySet();
        }
 
+       @VisibleForTesting
        public List<StreamEdge> getStreamEdges(int sourceId, int targetId) {
-
                List<StreamEdge> result = new ArrayList<>();
                for (StreamEdge edge : getStreamNode(sourceId).getOutEdges()) {
                        if (edge.getTargetId() == targetId) {
                                result.add(edge);
                        }
                }
+               return result;
+       }
 
+       @VisibleForTesting
+       @Deprecated
+       public List<StreamEdge> getStreamEdgesOrThrow(int sourceId, int 
targetId) {
 
 Review comment:
   Not sure what this whole change is about. Better commit message? Why is the 
new method deprecated already?
   
   Usually when I read `orThrow` I except some customizable error; see 
`Optional#orElseThrow(Supplier<X> exceptionSupplier)`.
   
   I'd probably just add this methods to the test as 
   ```
   public static List<StreamEdge> getNonEmptyStreamEdges(Environment env, int 
sourceId, int targetId) { ... }
   ```
   It just adds convenience for writing test.  `@VisibleForTesting` should be 
about giving access to something that is inaccessible.

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