You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by gyfora <gi...@git.apache.org> on 2015/07/10 13:35:55 UTC
[GitHub] flink pull request: Make streaming iterations more robust
GitHub user gyfora opened a pull request:
https://github.com/apache/flink/pull/900
Make streaming iterations more robust
This PR reworks the way iterations are constructed in the streamgraph from the previous eager approach to do it when we actually create the jobgraph.
This new approach solves many know and unknown issues that the previous approach had, such as issues with multiple tail and head operators (FLINK-2328), issues with partitioning on the feedback stream, issues with ConnectedIterations and immutability of the IterativeDataStream etc.
I also included a new set of tests to validate all the expected functionality:
-Test for simple and connected iterations with more heads and tails
-Parallelism, partitioning and co-location checks
-Tests for the exceptions thrown during job creation for invalid iterative topologies
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gyfora/flink master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/900.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #900
----
commit 9fef88306bc79f1f2e0520ddeb2ef10be8e4de09
Author: Gyula Fora <gy...@apache.org>
Date: 2015-07-10T11:26:44Z
[FLINK-2335] [streaming] Lazy iteration construction in StreamGraph
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request: Make streaming iterations more robust
Posted by gyfora <gi...@git.apache.org>.
Github user gyfora commented on a diff in the pull request:
https://github.com/apache/flink/pull/900#discussion_r34357746
--- Diff: flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/datastream/IterativeDataStream.java ---
@@ -201,14 +204,16 @@ public ConnectedIterativeDataStream(IterativeDataStream<I> input, TypeInformatio
* @return The feedback stream.
*
*/
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public DataStream<F> closeWith(DataStream<F> feedbackStream) {
- DataStream<F> iterationSink = new DataStreamSink<F>(input.environment, "Iteration Sink",
- null, null);
+ if (input.closed) {
+ throw new IllegalStateException(
--- End diff --
I think this is a fair restriction, the user can always union.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request: Make streaming iterations more robust
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/flink/pull/900
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request: Make streaming iterations more robust
Posted by senorcarbone <gi...@git.apache.org>.
Github user senorcarbone commented on a diff in the pull request:
https://github.com/apache/flink/pull/900#discussion_r34359293
--- Diff: flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/datastream/IterativeDataStream.java ---
@@ -201,14 +204,16 @@ public ConnectedIterativeDataStream(IterativeDataStream<I> input, TypeInformatio
* @return The feedback stream.
*
*/
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public DataStream<F> closeWith(DataStream<F> feedbackStream) {
- DataStream<F> iterationSink = new DataStreamSink<F>(input.environment, "Iteration Sink",
- null, null);
+ if (input.closed) {
+ throw new IllegalStateException(
--- End diff --
sure
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request: Make streaming iterations more robust
Posted by senorcarbone <gi...@git.apache.org>.
Github user senorcarbone commented on the pull request:
https://github.com/apache/flink/pull/900#issuecomment-120405183
There are quite a few changes in this PR! In general I am very keen to eliminating DataStream "mutations" and adding that logic into the jobgraph building phase. The code is clear enough, I didn't find any errors so far and tests are use-case complete and pass so :+1: from me.
So again what actually happens now (correct me if I am wrong) is that we actually reuse the same src-sink pair for loops with the same parallelism and create additional src-sinks otherwise, correct?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request: Make streaming iterations more robust
Posted by senorcarbone <gi...@git.apache.org>.
Github user senorcarbone commented on a diff in the pull request:
https://github.com/apache/flink/pull/900#discussion_r34352021
--- Diff: flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/datastream/IterativeDataStream.java ---
@@ -201,14 +204,16 @@ public ConnectedIterativeDataStream(IterativeDataStream<I> input, TypeInformatio
* @return The feedback stream.
*
*/
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public DataStream<F> closeWith(DataStream<F> feedbackStream) {
- DataStream<F> iterationSink = new DataStreamSink<F>(input.environment, "Iteration Sink",
- null, null);
+ if (input.closed) {
+ throw new IllegalStateException(
--- End diff --
Since now we build the loops at the job graph generation, wouldn't it be reasonable to do an implicit union there?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---