You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Amit Sela (JIRA)" <ji...@apache.org> on 2017/01/24 20:53:26 UTC

[jira] [Created] (BEAM-1304) NPE if trying to get value of Aggregator that does not exist.

Amit Sela created BEAM-1304:
-------------------------------

             Summary: 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.4#6332)