[ https://issues.apache.org/jira/browse/FLINK-3335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15139749#comment-15139749 ]
ASF GitHub Bot commented on FLINK-3335: --------------------------------------- GitHub user greghogan opened a pull request: https://github.com/apache/flink/pull/1616 [FLINK-3335] [runtime] Fix DataSourceTask object reuse when disabled When object reuse is disabled, `DataSourceTask` now copies objects received from the `InputFormat` to prevent the collection of reused objects. An example where this is necessary is a `DataSet` created from a user implementation of `Iterator` which reuses a local object returned from `Iterator.next`. Also, when object reuse is enabled, the cycling among three objects has been removed. I had added this a few months ago when starting to resolve an issue with reduce drivers. You can merge this pull request into a Git repository by running: $ git pull https://github.com/greghogan/flink 3335_fix_datasourcetask_object_reuse_when_disabled Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/1616.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 #1616 ---- commit 2678b9315a28ce27d888c7be53e5cce13b1afb35 Author: Greg Hogan <c...@greghogan.com> Date: 2016-02-09T13:18:28Z [FLINK-3335] [runtime] Fix DataSourceTask object reuse when disabled When object reuse is disabled, DataSourceTask now copies objects received from the InputFormat to prevent the collection of reused objects. ---- > Fix DataSourceTask object reuse when disabled > --------------------------------------------- > > Key: FLINK-3335 > URL: https://issues.apache.org/jira/browse/FLINK-3335 > Project: Flink > Issue Type: Bug > Components: Distributed Runtime > Affects Versions: 1.0.0 > Reporter: Greg Hogan > Assignee: Greg Hogan > > From {{DataSourceTask.invoke()}}: > {code} > if ((returned = format.nextRecord(serializer.createInstance())) != null) { > output.collect(returned); > } > {code} > The returned value ({{returned}}) must be copied rather than creating and > passing in a new instance. The {{InputFormat}} interface only permits the > given object to be used and does not require a new object to be returned > otherwise. -- This message was sent by Atlassian JIRA (v6.3.4#6332)