You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2016/02/02 00:22:39 UTC

[jira] [Commented] (SPARK-13121) java mapWithState mishandles scala Option

    [ https://issues.apache.org/jira/browse/SPARK-13121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15127234#comment-15127234 ] 

Apache Spark commented on SPARK-13121:
--------------------------------------

User 'gabrielenizzoli' has created a pull request for this issue:
https://github.com/apache/spark/pull/11007

> java mapWithState mishandles scala Option
> -----------------------------------------
>
>                 Key: SPARK-13121
>                 URL: https://issues.apache.org/jira/browse/SPARK-13121
>             Project: Spark
>          Issue Type: Bug
>          Components: Java API, Streaming
>    Affects Versions: 1.6.0
>            Reporter: Gabriele Nizzoli
>            Priority: Critical
>
> in Spark Streaming, java mapWithState that uses Function3 has a bug in the convertion from a scala Option to a java Optional. In the conversion, the code in `StateSpec.scala`, line 222 is
> `Optional.fromNullable(v.get)`. This fails if `v`, an `Option`, is `None`, better to use `JavaUtils.optionToOptional(v)` instead.
> Workaround is to use the Function4 call to mapWithState. This call has the right conversion.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org