Re: compile error: No classtag available while calling RDD.zip()

2017-09-13 Thread bluejoe
: <zouz...@gmail.com> 日期: 2017年9月14日 星期四 上午2:10 至: bluejoe 抄送: user 主题: Re: compile error: No classtag available while calling RDD.zip() Hi there, If it is OK with you to work with DataFrames, you can do https://gist.github.com/zouzias/44723de11222535223fe59b4b0bc228c

Re: compile error: No classtag available while calling RDD.zip()

2017-09-13 Thread Anastasios Zouzias
Hi there, If it is OK with you to work with DataFrames, you can do https://gist.github.com/zouzias/44723de11222535223fe59b4b0bc228c import org.apache.spark.sql.Row import org.apache.spark.sql.types.{StructField,StructType,IntegerType, LongType} val df = sc.parallelize(Seq( (1.0, 2.0), (0.0,

compile error: No classtag available while calling RDD.zip()

2017-09-13 Thread 沈志宏
Hello,Since Dataset has no zip(..) methods, so I wrote following code to zip two datasets:  1 def zipDatasets[X: Encoder, Y: Encoder](spark: SparkSession, m: Dataset[X], n: Dataset[Y]) = { 2 val rdd = m.rdd.zip(n.rdd); 3 import spark.implicits._ 4