You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by aaltay <gi...@git.apache.org> on 2017/01/26 01:55:05 UTC

[GitHub] beam pull request #1848: [BEAM-1319] Add conflict resolution to the Pipeline...

GitHub user aaltay opened a pull request:

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

    [BEAM-1319] Add conflict resolution to the PipelineOptions internal argparse.

    In some instances where a PipelineOptions subclass was defined in the
    main session and save_main_session option is enabled, that subclass may
    appear multiple times in the PipelineOptions.__subclassess__() list.
    This is causing problems with the argparse because options are not
    unique any more.
    
    This changes filter the subclasses by name, and pick the last unique
    instance of each subclass.
    
    As an alternative option, we could use the conflict_handler='resolve' of
    the argparse. However, the drawback of this approach would be that allowing
    accidental overriding of the same option name in two different PipelineOptions
    subclasses.
    
    Also moves wordcount example to use PipelineOptions. This both serves as an
    example of using PipelineOptions, also it is already integrated with
    tests and will continue to test this case.

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

    $ git pull https://github.com/aaltay/incubator-beam wordo

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

    https://github.com/apache/beam/pull/1848.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 #1848
    
----
commit b488555304f1110125598dd624077eb94ed0d0d7
Author: Ahmet Altay <al...@google.com>
Date:   2017-01-26T01:48:13Z

    Add conflict resolution to the PipelineOptions internal argparse.
    
    In some instances where a PipelineOptions subclass was defined in the
    main session and save_main_session option is enabled, that subclass may
    appear multiple times in the PipelineOptions.__subclassess__() list.
    This is causing problems with the argparse because options are not
    unique any more.
    
    This changes filter the subclasses by name, and pick the last unique
    instance of each subclass.
    
    As an alternative option, we could use the conflict_handler='resolve' of
    the argparse. However, the drawback of this approach would be that allowing
    accidental overriding of the same option name in two different PipelineOptions
    subclasses.
    
    Also moves wordcount to use PipelineOptions. This both serves as an
    example of using PipelineOptions, also it is already integrated with
    tests and will continue to test this case.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] beam pull request #1848: [BEAM-1319] Add conflict resolution to the Pipeline...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---