You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/02/05 10:19:41 UTC
[jira] [Commented] (BEAM-1304) NPE if trying to get value of
Aggregator that does not exist.
[ https://issues.apache.org/jira/browse/BEAM-1304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15853185#comment-15853185 ]
ASF GitHub Bot commented on BEAM-1304:
--------------------------------------
GitHub user staslev opened a pull request:
https://github.com/apache/beam/pull/1921
[BEAM-1304] Checking for nullity before trying to obtain an aggregator's value.
Be sure to do all of the following to help us incorporate your contribution
quickly and easily:
- [ ] Make sure the PR title is formatted like:
`[BEAM-<Jira issue #>] Description of pull request`
- [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable
Travis-CI on your fork and ensure the whole test matrix passes).
- [ ] Replace `<Jira issue #>` in the title with the actual Jira issue
number, if there is one.
- [ ] If this contribution is large, please file an Apache
[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt).
---
R: @amitsela
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/staslev/beam BEAM-1304-fixing-NPE-for-values-of-missing-aggregators
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/beam/pull/1921.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 #1921
----
commit 658044932eea5e8566fd2166356d05302b4fd79b
Author: Stas Levin <st...@gmail.com>
Date: 2017-02-05T10:17:35Z
[BEAM-1304] Checking for nullity before trying to obtain an aggregator's value.
----
> NPE if trying to get value of Aggregator that does not exist.
> -------------------------------------------------------------
>
> Key: BEAM-1304
> URL: https://issues.apache.org/jira/browse/BEAM-1304
> Project: Beam
> Issue Type: Bug
> Components: runner-spark
> Reporter: Amit Sela
> Assignee: Amit Sela
>
> Querying a specific aggregator value in {{SparkPipelineResult}} could throw NPE if the get Aggregator name doesn't exist.
> This is the root of the problem: https://github.com/apache/beam/blob/master/runners/spark/src/main/java/org/apache/beam/runners/spark/aggregators/NamedAggregators.java#L74
> {{Map#get()}} will return {{null}}.
> We could either return {{null}}, though this could simply propagate the problem upstream, or use {{Optional}}.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)