assign unique ID (Long Value) to each line in RDD

2015-06-25 Thread Ravikant Dindokar
I have a file containing one line for each edge in the graph with two vertex ids (source & sink). sample: 12 (here 1 is source and 2 is sink node for the edge) 15 23 42 43 I want to assign a unique Id (Long value )to each edge i.e for each line of the file. How to ensure assign

Re: Parsing a tsv file with key value pairs

2015-06-25 Thread Ravikant Dindokar
12 15 23 expected output : RDD (<1,2>,<1,5>,<2,3>) Thanks Ravikant On Thu, Jun 25, 2015 at 2:59 PM, anshu shukla wrote: > Can you be more specific Or can you provide sample file . > > On Thu, Jun 25, 2015 at 11:00 AM, Ravikant Dindokar < > ravikant

Parsing a tsv file with key value pairs

2015-06-24 Thread Ravikant Dindokar
Hi Spark user, I am new to spark so forgive me for asking a basic question. I'm trying to import my tsv file into spark. This file has key and value separated by a \t per line. I want to import this file as dictionary of key value pairs in Spark. I came across this code to do the same for csv fil