I have DStream that contains user model and I want to create user cartesian by python API.
I checked this post for scala API.
And I make the next scripts for creating user cartesian.
user_cartesian = user_models.transform(lambda user: user.cartesian(user))
But, next error happened.
java.lang.ClassCastException: org.apache.spark.api.java.JavaPairRDD cannot be cast to org.apache.spark.api.java.JavaRDD
user_models
is the normal Array DStream containing user instance like [user1, user2...]
and do not contain the pair(tuple) instance.
I do not know why this eror happened.
If anyone have advice, please tell me.