beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amit Sela (JIRA)" <j...@apache.org>
Subject [jira] [Created] (BEAM-1304) NPE if trying to get value of Aggregator that does not exist.
Date Tue, 24 Jan 2017 20:53:26 GMT
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)

Mime
View raw message