beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BEAM-790) Validate PipelineOptions Default annotation
Date Fri, 21 Oct 2016 00:02:13 GMT

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

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

GitHub user peihe opened a pull request:

    https://github.com/apache/incubator-beam/pull/1151

    [BEAM-790] Refactor PipelineOptionsFactory validation.

    


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

    $ git pull https://github.com/peihe/incubator-beam validate-default

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

    https://github.com/apache/incubator-beam/pull/1151.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 #1151
    
----
commit 9e097c9f7aff0a462289602b0439a8f3e9340681
Author: Pei He <peihe@google.com>
Date:   2016-10-20T23:32:45Z

    [BEAM-790] Refactor PipelineOptionsFactory validation.

----


> Validate PipelineOptions Default annotation
> -------------------------------------------
>
>                 Key: BEAM-790
>                 URL: https://issues.apache.org/jira/browse/BEAM-790
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>            Reporter: Pei He
>            Assignee: Pei He
>
> It shouldn't allow @Override with @Default annotation, for example the following is broken:
> interface A {
>   @Default.Integer(1)
>   Integer getFoo();
>   void setFoo();
> }
> interface B extends A {
>   @Default.Integer(-1)
>   @Override
>   Integer getFoo();
> }
> It is broken, because PipelineOptions default values are lazily evaluated. And, it will
depends on which one of the two following operations happen first:
> options.as(A.class) and options.as(B.class)
> If users want to change the default value, users should do setFoo(...) explicitly.
> It shouldn't allow adding Default annotation as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message