Use combineByKey to get output as (key, iterable[values])
问题 I am trying to transform RDD(key,value) to RDD(key,iterable[value]) , same as output returned by the groupByKey method. But as groupByKey is not efficient, I am trying to use combineByKey on the RDD instead, however, it is not working. Below is the code used: val data= List("abc,2017-10-04,15.2", "abc,2017-10-03,19.67", "abc,2017-10-02,19.8", "xyz,2017-10-09,46.9", "xyz,2017-10-08,48.4", "xyz,2017-10-07,87.5", "xyz,2017-10-04,83.03", "xyz,2017-10-03,83.41", "pqr,2017-09-30,18.18", "pqr,2017