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

Sean Owen commented on SPARK-18229:
-----------------------------------

String.toSeq gives you a Scala WrappedString, which is not serializable. I 
don't think that's a Spark problem per se. If you really mean to collect the 
strings a sequence of chars, and can settle for a List, then toList happens to 
result in a serializable object.

> Row.toSeq causes java.io.NotSerializableException
> -------------------------------------------------
>
>                 Key: SPARK-18229
>                 URL: https://issues.apache.org/jira/browse/SPARK-18229
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Daniel Haviv
>
> issuing the following code causes a notSerializableException:
>  val jsonRDD = sc.parallelize(Seq("{\"iid\":\"daniel\", \"seller\":\"stam\", 
> \"bogus\":2, \"activity\":null, \"anotherField\":\"x\"}"))
> jsonRDD.map(r=>r.toSeq).collect



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

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

Reply via email to