beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From echauchot <>
Subject [GitHub] beam pull request #2573: [BEAM-1948] Add protection against null pointer exc...
Date Tue, 18 Apr 2017 14:20:22 GMT
GitHub user echauchot opened a pull request:

    [BEAM-1948] Add protection against null pointer exception if aggregator key is not present
in aggregatorSteps in DirectRunner.DirectPipelineResult.getAggregatorValues(aggregator)

    Be sure to do all of the following to help us incorporate your contribution
    quickly and easily:
     - [X] Make sure the PR title is formatted like:
       `[BEAM-<Jira issue #>] Description of pull request`
     - [X] Make sure tests pass via `mvn clean verify`. (Even better, enable
           Travis-CI on your fork and ensure the whole test matrix passes).
     - [X] Replace `<Jira issue #>` in the title with the actual Jira issue
           number, if there is one.
     - [X] If this contribution is large, please file an Apache
           [Individual Contributor License Agreement](
    I have run into a case in which `aggregator` key is not present in `aggregatorSteps` in
`DirectRunner.DirectPipelineResult.getAggregatorValues(aggregator)` causing a null pointer
exception.  It might be because, in the user code, the `aggregator` is created but the `aggregator.addValue()`
is never called (aggregator is a fatal errors counter). 
    This PR is just a simple protection against this error.
    R: @tgroh 
    CC: @jbonofre 

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

    $ git pull BEAM-1948-Null_pointer_exception_in_DirectRunner.DirectPipelineResult.getAggregatorValues

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

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2573


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 or file a JIRA ticket
with INFRA.

View raw message