You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2017/10/08 17:34:03 UTC

[jira] [Commented] (SPARK-17756) java.lang.ClassCastException when using cartesian with DStream.transform

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

Hyukjin Kwon commented on SPARK-17756:
--------------------------------------

Still happens in the current master. Will set the affected version.

> java.lang.ClassCastException when using cartesian with DStream.transform
> ------------------------------------------------------------------------
>
>                 Key: SPARK-17756
>                 URL: https://issues.apache.org/jira/browse/SPARK-17756
>             Project: Spark
>          Issue Type: Bug
>          Components: DStreams, PySpark
>    Affects Versions: 2.0.0, 2.3.0
>            Reporter: Maciej Szymkiewicz
>
> Steps to reproduce:
> {code}
> from pyspark.streaming import StreamingContext
> ssc = StreamingContext(spark.sparkContext, 10)
> (ssc
>     .queueStream([sc.range(10)])
>     .transform(lambda rdd: rdd.cartesian(rdd))
>     .pprint())
> ssc.start()
> ## 16/10/01 21:34:30 ERROR JobScheduler: Error generating jobs for time 1475350470000 ms
> ## java.lang.ClassCastException: org.apache.spark.api.java.JavaPairRDD ## cannot be cast to org.apache.spark.api.java.JavaRDD
> ## 	at com.sun.proxy.$Proxy15.call(Unknown Source)
> ##    ....
> {code}
> A dummy fix is to put {{map(lamba x: x)}} which suggests it is a problem similar to https://issues.apache.org/jira/browse/SPARK-16589



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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