You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/11/15 19:45:10 UTC

[jira] [Commented] (FLINK-3012) Refactor boilerplate code of while and if statements in DataSourceTask

    [ https://issues.apache.org/jira/browse/FLINK-3012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15005990#comment-15005990 ] 

ASF GitHub Bot commented on FLINK-3012:
---------------------------------------

GitHub user jaoki opened a pull request:

    https://github.com/apache/flink/pull/1355

    [FLINK-3012] Refactor boilerplate code in DataSourceTask

    Refactor repetitive and boilerplate code of while and if statements in DataSourceTask
    The previous if and else nest and to control the timing to instantiate 'reuse' and the new code emphasizes the point.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jaoki/flink refactor-DataSourceTask-around-calling-nextRecord

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/1355.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 #1355
    
----
commit a9c399920ada0147e6e787f8630a77ee3809f257
Author: jaoki <ja...@apache.org>
Date:   2015-11-15T18:34:07Z

    Refactor boilerplate code in DataSourceTask
    
    Refactor boilerplate code of while and if statements in DataSourceTask
    The previous if and else nest was to control the timing to instantiate 'reuse'.
    And the new code emphasizes the point.

----


> 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)