I have an rdd like this:
我有一个这样的rdd:
val custFile = sc.textFile("custInfo.txt").map(line => line.split('|'))
val custPrd = custFile.map(a => (a(0), ((a(1)), (a(2), a(3), a(4), a(5), a(6), a(7), a(8)))))
val custGrp = custPrd.groupByKey
custGrp.saveAsTextFile("custinfo2")
val cu