title: PageRank using GraphX
body: <p>I have a .txt file say list.txt which consists of list of source and destination URL in the format</p>
  
  <pre><code>google.de/2011/10/Extract-host       link.de/2011/10/extact-host
  facebook.de/2014/11/photos           facebook.de/2014/11/name.jpg
  community.cloudera.com/t5/           community.cloudera.com/t10/
  facebook.de/2014/11/photos           link.de/2011/10/extact-host
  </code></pre>
  
  <p>With the help of this post, <a href="https://stackoverflow.com/questions/31189092/how-to-create-a-vertexid-in-apache-spark-graphx-using-a-long-data-type">How to create a VertexId in Apache Spark GraphX using a Long data type?</a>
  I tried to create node and edges like :</p>
  
  <pre><code>val test = sc.textFile("list.txt")                                                                                       //running
  
  val arrayForm = test.map(_.split("\t"))                                                                            // running
  
  val nodes: RDD[(VertexId, Option[String])] = arrayForm.flatMap(array =&gt; array).
  map((_.toLong None))                                                                                                  
  
  val edges: RDD[Edge[String]] = arrayForm.
  map(line =&gt; Edge(line(0), line(1), "")) 
  </code></pre>
  
  <p>The problem here is I don't really know how to create VertexId and similarly edge from string datatype. Please let me know how to resolve this.</p>