: org.apache.spark.rdd.RDD[(Int, Int)] = MappedRDD[9] at map at
console:16
scala rdd2.collect
res8: Array[(Int, Int)] = Array((0,10), (1,20), (2,30))
Thierry
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/How-to-index-each-map-operation-tp3471p3614.html
in context:
http://apache-spark-user-list.1001560.n3.nabble.com/How-to-index-each-map-operation-tp3471p3624.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
to wirte like this but didnt work out..
var i=0;
k.map(t={
(i,t);i+=1;
})
please correct me...
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/How-to-index-each-map-operation-tp3471.html
Sent from the Apache Spark User List mailing list archive