I am trying to run connected components algorithm on a graph using the Scala API as shown in the programming guide and other examples.
val graph = Graph.fromDataSet(vertices, edges, env).getUndirected
val maxIterations = 10
val components = graph.run(new ConnectedComponents(maxIterations))
And I get the following error:
Type mismatch, expected: GraphAlgorithm[Long,String,Long,NotInferedT], actual: ConnectedComponents[Nothing,Nothing]
And even if I add
val components = graph.run(new ConnectedComponents[Long,String,Long](maxIterations))
I get:
Type mismatch, expected: GraphAlgorithm[Long,String,Long,NotInferedT], actual: ConnectedComponents[Long,String]
My imports are these:
import org.apache.flink.api.scala._
import org.apache.flink.graph.library.ConnectedComponents
import org.apache.flink.graph.{Vertex, Edge}
import org.apache.flink.graph.scala.Graph
Can someone please explain why this is happening?