[
https://issues.apache.org/jira/browse/FLINK-3012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15006051#comment-15006051
]
ASF GitHub Bot commented on FLINK-3012:
---------------------------------------
Github user StephanEwen commented on the pull request:
https://github.com/apache/flink/pull/1355#issuecomment-156859098
Thanks for the interest in helping us maintain clear code.
I think actually that the original code was easier than the code with
counter checks. Further more, it moves branches away from loops (easier
optimizable by the JIT compiler). Finally, the new code will be wrong if the
counter overflows/wraps around, which is not unthinkable. 4 Billion elements is
quite within the scope of many applications.
I am curious about other opinions.
> Refactor boilerplate code of while and if statements in DataSourceTask
> ----------------------------------------------------------------------
>
> Key: FLINK-3012
> URL: https://issues.apache.org/jira/browse/FLINK-3012
> Project: Flink
> Issue Type: Improvement
> Reporter: jun aoki
> Priority: Trivial
>
> Part of DataSourceTask code seems repetitive.
> https://github.com/jaoki/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/operators/DataSourceTask.java#L153-L173
> The same 'while', 'if' and createInstance() shows up.
> This ticket to refactor it to avoid the boilerplate code.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)