flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject flink git commit: [FLINK-2982][cli] Fix to show streaming plans via info option.
Date Mon, 09 Nov 2015 17:17:33 GMT
Repository: flink
Updated Branches:
  refs/heads/master ed73f661e -> 4462f530a


[FLINK-2982][cli] Fix to show streaming plans via info option.

This closes #1334.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/4462f530
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/4462f530
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/4462f530

Branch: refs/heads/master
Commit: 4462f530aed392b5030c40a1678fafbd9c6a7dcd
Parents: ed73f66
Author: Sachin Goel <sachingoel0101@gmail.com>
Authored: Fri Nov 6 12:49:36 2015 +0530
Committer: Maximilian Michels <mxm@apache.org>
Committed: Mon Nov 9 18:14:25 2015 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/flink/client/CliFrontend.java  | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/4462f530/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java
----------------------------------------------------------------------
diff --git a/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java b/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java
index 5485030..2211012 100644
--- a/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java
+++ b/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java
@@ -63,6 +63,7 @@ import org.apache.flink.optimizer.Optimizer;
 import org.apache.flink.optimizer.costs.DefaultCostEstimator;
 import org.apache.flink.optimizer.plan.FlinkPlan;
 import org.apache.flink.optimizer.plan.OptimizedPlan;
+import org.apache.flink.optimizer.plan.StreamingPlan;
 import org.apache.flink.optimizer.plandump.PlanJSONDumpGenerator;
 import org.apache.flink.runtime.akka.AkkaUtils;
 import org.apache.flink.runtime.client.JobStatusMessage;
@@ -415,8 +416,12 @@ public class CliFrontend {
 				this.optimizedPlan = flinkPlan;
 				this.packagedProgram = program;
 			} else {
-				String jsonPlan = new PlanJSONDumpGenerator()
-						.getOptimizerPlanAsJSON((OptimizedPlan) flinkPlan);
+				String jsonPlan = null;
+				if (flinkPlan instanceof OptimizedPlan) {
+					jsonPlan = new PlanJSONDumpGenerator().getOptimizerPlanAsJSON((OptimizedPlan) flinkPlan);
+				} else if (flinkPlan instanceof StreamingPlan) {
+					jsonPlan = ((StreamingPlan) flinkPlan).getStreamingPlanAsJSON();
+				}
 
 				if (jsonPlan != null) {
 					System.out.println("----------------------- Execution Plan -----------------------");


Mime
View raw message