Good question, I am wondering too how it is possible to add a line number to distributed data.
I thought it was a job for maptPartionsWithIndex, but it seems difficult. Something similar here : http://apache-spark-user-list.1001560.n3.nabble.com/RDD-and-Partition-td991.html#a995 Maybe at the file reader knowing it works on the first HDFS block, to count line numbers or something ? André On 2014-04-23 18:18, Chengi Liu wrote:
Hi, What is the easiest way to skip first n lines in rdd?? I am not able to figure this one out? Thanks
-- André Bois-Crettez Software Architect Big Data Developer http://www.kelkoo.com/ Kelkoo SAS Société par Actions Simplifiée Au capital de € 4.168.964,30 Siège social : 8, rue du Sentier 75002 Paris 425 093 069 RCS Paris Ce message et les pièces jointes sont confidentiels et établis à l'attention exclusive de leurs destinataires. Si vous n'êtes pas le destinataire de ce message, merci de le détruire et d'en avertir l'expéditeur.
