title: Graphx get vertex label from vertex id
body: <p>I have  the following graph in Graphx</p>
  
  <pre><code>graph.vertices.foreach(println)
  
  (6109253945443866644,"Futurama"@en)
  (7558506336564503178,"AccessibleComputing"@en)
  (0,null)
  (-2278222762001827643,"Programming languages"@en)
  (-9007336571746445204,http://dbpedia.org/resource/Category:Presocratic_philosophers)
  (-3236797006683951166,http://dbpedia.org/resource/Category:Programming_languages)
  (-4159090027031366209,http://dbpedia.org/resource/Anaximenes_of_Miletus)
  (7722304331424482609,http://dbpedia.org/resource/Category:Futurama)
  (-323898215277667127,http://dbpedia.org/resource/AccessibleComputing)
  </code></pre>
  
  <p>I have applied connected components algorithm on this graph whose output is as below :-</p>
  
  <pre><code>ccGraph.vertices.foreach(println)
  
  (6109253945443866644,6109253945443866644)
  (7558506336564503178,-323898215277667127)
  (0,0)
  (-2278222762001827643,-3236797006683951166)
  (-9007336571746445204,-9007336571746445204)
  (-3236797006683951166,-3236797006683951166)
  (-4159090027031366209,-9007336571746445204)
  (7722304331424482609,6109253945443866644)
  (-323898215277667127,-323898215277667127)
  </code></pre>
  
  <p>I can't find a way to find the vertex label/vertex name for (vertexID,vertexID) in ccGraph such that the output transforms from   <br>
  (vertexID,vertexID) => (vertexLabel,vertexLabel) <br></p>
  
  <p>I have tried the following approach but failed <br></p>
  
  <pre><code>    ccGraph.vertices.map({case arr =&gt;  
  val k1 = graph.vertices.lookup(arr(0))
  val k2 = graph.vertices.lookup(arr(1))
  (k1,k2)
  })
  
  &lt;console&gt;:51: error: (org.apache.spark.graphx.VertexId, org.apache.spark.graphx.VertexId) does not take parameters
                    ccGraph.vertices.map({case arr =&gt;  val k1 = graph1.vertices.lookup(arr(0))
                                                                                          ^
  &lt;console&gt;:52: error: (org.apache.spark.graphx.VertexId, org.apache.spark.graphx.VertexId) does not take parameters
                                                       val k2 = graph1.vertices.lookup(arr(1))
  </code></pre>