You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/04/19 22:46:04 UTC

[jira] [Commented] (BEAM-1414) CountingInput should comply with PTransform style guide

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

ASF GitHub Bot commented on BEAM-1414:
--------------------------------------

GitHub user jkff opened a pull request:

    https://github.com/apache/beam/pull/2601

    [BEAM-1414] Replaces CountingInput with style guide compliant GenerateSequence

    Migration guide:
    `CountingInput.unbounded()` -> `GenerateSequence.from(0)`
    `CountingInput.upTo(n)` -> `GenerateSequence.fromTo(0, n)`
    
    Removing rogue direct uses of CountingSource is for another PR and less critical.

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

    $ git pull https://github.com/jkff/incubator-beam count-style

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

    https://github.com/apache/beam/pull/2601.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 #2601
    
----
commit d0d97f165d954471ae2e693efea5d65e44dfaaa2
Author: Eugene Kirpichov <ki...@google.com>
Date:   2017-04-18T23:48:38Z

    Introduces GenerateSequence transform
    
    It is a replacement for CountingInput, which will be deprecated.

commit 8199c5fb65807e062854952720d6dc2a751c1e56
Author: Eugene Kirpichov <ki...@google.com>
Date:   2017-04-19T22:32:08Z

    Replaces all usages of CountingInput with GenerateSequence

commit 767af74f9d7105e25872aad873c3c70fe87f741c
Author: Eugene Kirpichov <ki...@google.com>
Date:   2017-04-19T22:36:42Z

    Deletes CountingInput

----


> CountingInput should comply with PTransform style guide
> -------------------------------------------------------
>
>                 Key: BEAM-1414
>                 URL: https://issues.apache.org/jira/browse/BEAM-1414
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Eugene Kirpichov
>              Labels: backward-incompatible, starter
>             Fix For: First stable release
>
>
> Suggested changes:
> - Rename the whole class and its inner transforms to sound more verb-like, e.g.: GenerateRange.Bounded/Unbounded (as opposed to current CountingInput.BoundedCountingInput)
> - Provide a more unified API between bounded and unbounded cases: GenerateRange.from(100) should return a GenerateRange.Unbounded; GenerateRange.from(100).to(200) should return a GenerateRange.Bounded. They both should accept a timestampFn. The unbounded one _should not_ have a withMaxNumRecords builder - that's redundant with specifying the range.
> - (optional) Use AutoValue



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)