beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (BEAM-1948) Null pointer exception in DirectRunner.DirectPipelineResult.getAggregatorValues()
Date Tue, 18 Apr 2017 14:20:41 GMT


ASF GitHub Bot commented on BEAM-1948:

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


> Null pointer exception in DirectRunner.DirectPipelineResult.getAggregatorValues()
> ---------------------------------------------------------------------------------
>                 Key: BEAM-1948
>                 URL:
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-direct
>            Reporter: Etienne Chauchot
>            Assignee: Etienne Chauchot
>            Priority: Minor
> Running query3 of nexmark (
in streaming mode (UnboundedSource) on Direct runner generates a null pointer exception  in
{code} DirectRunner.DirectPipelineResult.getAggregatorValues() {code}
> In
> {code} if (steps.contains(transform.getTransform())) {code}
> {code} steps == null  {code}
> to reproduce it :
> run {code} NexmarkDirectDriver.main() {code}
> with options
> {code}
> --query=3 --streaming=true --numEventGenerators=4 --manageResources=false --monitorJobs=true
--enforceEncodability=false --enforceImmutability=false
> {code}
> see the repo in link above

This message was sent by Atlassian JIRA

View raw message