Hi, You just need add list() in the sorted function. For example, map((lambda (x,y): (x, (list(y[0]), list(y[1])))), sorted(list(rdd1.cogroup(rdd2).collect())))
I think you just forget the list... PS: your post has NOT been accepted by the mailing list yet. Best Gen pm wrote > Hi , > > Thanks for reply , > > > now after doing cogroup mentioned in below, > > merge_rdd = map((lambda (x,y): (x, (list(y[0]), list(y[1])))), > sorted((rdd1.cogroup(rdd2).collect()))) > > map((lambda (x,y): (x, (list(y[0]), list(y[1])))), > sorted((merge_rdd.cogroup(rdd3).collect()))) > > > i m getting output like > > > [((u'abc', u'0010'), > ([( > <pyspark.resultiterable.ResultIterable at 0x4b1b4d0> > , > > <pyspark.resultiterable.ResultIterable at 0x4b1b550> > )], > [[(u'address, u'2017 CAN'), > (u'address_city', u'VESTAVIA '), > ]])), > ((u'abc', u'0020'), > ([( > <pyspark.resultiterable.ResultIterable at 0x4b1bd50> > , > > <pyspark.resultiterable.ResultIterable at 0x4b1bf10> > )], > [[(u'address', u'2017 CAN'), > (u'address_city', u'VESTAV'), > ]]))] > > How to show value for object pyspark.resultiterable.ResultIterable at > 0x4b1b4d0. > > I want to show data for pyspark.resultiterable.ResultIterable at > 0x4b1bd50. > > > Could please tell me the way to show data for those object . I m using > python > > > > Thanks, -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/How-to-make-operation-like-cogrop-groupbykey-on-pair-RDD-tp16487p16598.html Sent from the Apache Spark User List mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org