Now that we have our data, the next step is to create a graph. Let's fire up the Spark Shell. Run it from the directory where you have installed Spark:
We create the graph in two steps: first we create an RDD list of the vertices and edges, then we create RDDs and eventually the graph. You don't need to type the code; the
graphx-0x.scala files have the programs to create a graph and do the rest of the API stuff.
First we create the lists:
Let's quickly run through the code:
case class Person(name:String,age:Int) val defaultPerson = ...