aljoscha commented on a change in pull request #10526: [FLINK-15090][build] 
Reverse the dependency from flink-streaming-java to flink-client
URL: https://github.com/apache/flink/pull/10526#discussion_r389772909
 
 

 ##########
 File path: 
flink-clients/src/main/java/org/apache/flink/client/FlinkPipelineTranslationUtil.java
 ##########
 @@ -54,45 +54,19 @@ public static String translateToJSONExecutionPlan(Pipeline 
pipeline) {
        }
 
        private static FlinkPipelineTranslator getPipelineTranslator(Pipeline 
pipeline) {
-               PlanTranslator planToJobGraphTransmogrifier = new 
PlanTranslator();
+               PlanTranslator planTranslator = new PlanTranslator();
 
-               if (planToJobGraphTransmogrifier.canTranslate(pipeline)) {
-                       return planToJobGraphTransmogrifier;
+               if (planTranslator.canTranslate(pipeline)) {
+                       return planTranslator;
                }
 
-               FlinkPipelineTranslator streamGraphTranslator = 
reflectStreamGraphTranslator();
+               StreamGraphTranslator streamGraphTranslator = new 
StreamGraphTranslator();
 
-               if (!streamGraphTranslator.canTranslate(pipeline)) {
-                       throw new RuntimeException("Translator " + 
streamGraphTranslator + " cannot translate "
-                                       + "the given pipeline " + pipeline + 
".");
+               if (streamGraphTranslator.canTranslate(pipeline)) {
+                       return streamGraphTranslator;
                }
-               return streamGraphTranslator;
-       }
-
-       private static FlinkPipelineTranslator reflectStreamGraphTranslator() {
 
 Review comment:
   Nice, that we don't need this additional reflection anymore. 😃

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