[ https://issues.apache.org/jira/browse/FLINK-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14291047#comment-14291047 ]
ASF GitHub Bot commented on FLINK-1434: --------------------------------------- Github user gyfora commented on a diff in the pull request: https://github.com/apache/flink/pull/334#discussion_r23503611 --- Diff: flink-addons/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/StreamGraph.java --- @@ -536,4 +549,79 @@ public long getIterationTimeout(String vertexName) { return iterationTimeouts.get(vertexName); } + public String getOperatorName(String vertexName) { + return operatorNames.get(vertexName); + } + + @Override + public String getStreamingPlanAsJSON() { + + try { + JSONObject json = new JSONObject(); + JSONArray nodes = new JSONArray(); + + json.put("nodes", nodes); + + for (String id : operatorNames.keySet()) { + JSONObject node = new JSONObject(); + nodes.put(node); + + node.put("id", Integer.valueOf(id)); + node.put("type", getOperatorName(id)); + + if (sources.contains(id)) { + node.put("pact", "Data Source"); + } else { + node.put("pact", "Data Stream"); + } + + node.put("contents", getOperatorName(id) + " at " + + getInvokable(id).getUserFunction().getClass().getSimpleName()); + node.put("parallelism", getParallelism(id)); + + int numIn = getInEdges(id).size(); + if (numIn > 0) { + + JSONArray inputs = new JSONArray(); + node.put("predecessors", inputs); + + for (int i = 0; i < numIn; i++) { + + String inID = getInEdges(id).get(i); + + JSONObject input = new JSONObject(); + inputs.put(input); + + input.put("id", Integer.valueOf(inID)); + input.put("ship_strategy", getOutPartitioner(inID, id).getStrategy()); + if (i == 0) { + input.put("side", "first"); + } else if (i == 1) { + input.put("side", "second"); + } + } + } + + } + return json.toString(); + } catch (Exception e) { --- End diff -- Fixed > Web interface cannot be used to run streaming programs > ------------------------------------------------------ > > Key: FLINK-1434 > URL: https://issues.apache.org/jira/browse/FLINK-1434 > Project: Flink > Issue Type: Bug > Components: Streaming, Webfrontend > Affects Versions: 0.9 > Reporter: Gyula Fora > Assignee: Gyula Fora > > Flink streaming programs currently cannot be submitted through the web > client. When you try run the jar you get a ProgramInvocationException. > The reason for this might be that streaming programs completely bypass the > use of Plans for job execution and the streaming execution environment > directly submits the jobgraph to the client. -- This message was sent by Atlassian JIRA (v6.3.4#6332)