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

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

GitHub user vectorijk opened a pull request:

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

    [BEAM-2779] PipelineOptionsFactory should prevent non PipelineOptions 
interfaces from being constructed

    Follow this checklist to help us incorporate your contribution quickly and 
easily:
    
     - [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/projects/BEAM/issues/) filed for the 
change (usually before you start working on it).  Trivial changes like typos do 
not require a JIRA issue.  Your pull request should address just this issue, 
without pulling in other changes.
     - [ ] Each commit in the pull request should have a meaningful subject 
line and body.
     - [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA 
issue.
     - [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
     - [ ] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
     - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
    
    ---
    
    R: @lukecwik 

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

    $ git pull https://github.com/vectorijk/beam BEAM-2779-PipelineOption

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

    https://github.com/apache/beam/pull/3949.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 #3949
    
----
commit 45de4ecf0901ce6ebfab0296ba80de8357a05d2d
Author: Kai Jiang <[email protected]>
Date:   2017-10-04T06:41:32Z

    implement dfs check and experiments

commit 7feec656aa27ad844c70aa99c22b711904a466de
Author: Kai Jiang <[email protected]>
Date:   2017-10-05T09:14:48Z

    rewrite and add unit test

commit 51dccc0f5de4a743785e6a37745b7f505cdf549c
Author: Kai Jiang <[email protected]>
Date:   2017-10-05T12:31:38Z

    comments and Options revise

----


> PipelineOptionsFactory should prevent non PipelineOptions interfaces from 
> being constructed.
> --------------------------------------------------------------------------------------------
>
>                 Key: BEAM-2779
>                 URL: https://issues.apache.org/jira/browse/BEAM-2779
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>    Affects Versions: 2.0.0
>            Reporter: Luke Cwik
>            Assignee: Kai Jiang
>            Priority: Minor
>              Labels: starter
>
> PipelineOptions currently serializes information about all getter/setter 
> pairs on interfaces which don't extend PipelineOptions.
> For example:
> {code:java}
> interface Foo extends PipelineOptions, Bar {
>   String getFoo();
>   void setFoo(String value);
> }
> interface Bar {
>   String getBar();
>   void setBar(String value);
> }
> {code}
> The serialization of the above (when both *foo* and *bar* are set) will 
> produce JSON where we only include display data for *foo* but data for both 
> *foo* and *bar*. During validation of an interface in 
> *PipelineOptionsFactory*, we should throw an error if one of the users 
> interfaces doesn't extend *PipelineOptions* (note that we should ignore the 
> HasDisplayData interface).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to