Apache spark 将RDD.cartesian与Spark Streaming一起使用是否存在错误?

Apache spark 将RDD.cartesian与Spark Streaming一起使用是否存在错误?,apache-spark,pyspark,spark-streaming,Apache Spark,Pyspark,Spark Streaming,我的代码: ks1 = KafkaUtils.createStream(ssc, zkQuorum='localhost:2181', groupId='G1', topics={'test': 2}) ks2 = KafkaUtils.createStream(ssc, zkQuorum='localhost:2181', groupId='G2', topics={'test': 2}) d1 = ks1.map(lambda x: x[1]).flatMap(lambda x: list

我的代码:

ks1 = KafkaUtils.createStream(ssc, zkQuorum='localhost:2181', groupId='G1', topics={'test': 2})
ks2 = KafkaUtils.createStream(ssc, zkQuorum='localhost:2181', groupId='G2', topics={'test': 2})

d1 = ks1.map(lambda x: x[1]).flatMap(lambda x: list(x)).countByValue()
d2 = ks2.map(lambda x: x[1]).flatMap(lambda x: list(x)).countByValue()

d3 = d1.transformWith(lambda t, x, y: x.cartesian(y), d2)
然后我得到了一些错误:

java.lang.ClassCastException:org.apache.spark.api.java.javapairdd 无法强制转换为org.apache.spark.api.java.JavaRDD

p、 s.Python2.7.11+Spark 2.0.2


谢谢

是的,有一个已知的错误。这是一个JIRA: