GitHub user zentol opened a pull request: https://github.com/apache/flink/pull/5836
[FLINK-9141][datastream] Fail early when using both split and side-outputs ## What is the purpose of the change With this PR we fail early if a user attempts to use split() and side-outputs on a single DataStream. Previously this would lead to a NullPointerException at runtime. ## Brief change log * keep track of split() calls in `SingleOutputStreamOperator` by overriding it and setting the `wasSplitApplied` flag * add checks to split() and getSideOutput() that throw an exception if the other method was already called ## Verifying this change This change added tests and can be verified as follows: * run SplitSideOutputTest ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes) - The serializers: (no) - The runtime per-record code paths (performance sensitive): (no) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no) - The S3 file system connector: (no) ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable) You can merge this pull request into a Git repository by running: $ git pull https://github.com/zentol/flink 9141 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/5836.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 #5836 ---- commit ed3ec8716c6d26eee31c4d0ff02c8bfdd70a19d4 Author: zentol <chesnay@...> Date: 2018-04-11T09:13:52Z [FLINK-9141][datastream] Fail early when using both split and side-outputs ---- ---