I have an array of object like this
edges: Array[Array[(Long, Long, String)]] = Array(Array((-209215114,197853780,Investor), (-209215114,-322475625,Investor), ...
and i want to convert it to an array of Edge to pass to a Graph builder. Here is what i am using:
val eRDD: RDD[Edge[(VertexId, VertexId, String)]] = edges.map(x => Edge(x(0), x(1), x(2)))
I am getting the following error:
<console>:107: error: type mismatch;
found : (Long, Long, String)
required: org.apache.spark.graphx.VertexId
(which expands to) Long
val eRDD: RDD[Edge[(VertexId, VertexId, String)]] = edges.map(x => Edge(x(0), x(1), x(2)))