我不熟悉apache flink和gelly,我使用scalaapi。我有一个顶点数据集和一个边数据集,我试图创建这样一个图:
val env = ExecutionEnvironment.getExecutionEnvironment
// correct result
val edges: DataSet[Edge[Long, Long]] = (some transformations here)
//also correct result
val vertices: DataSet[Vertex[Long, String]] = (some transformations here)
//in the line below I get the errors
val graph = Graph.fromDataSet(vertices, edges, env)
我得到以下错误:
Type mismatch,expected:
DataSet[Vertex[NotInferedK,NotInferedVV]], actual: DataSet[Vertex[Long,String]]
Type mismatch,expected:
DataSet[Edges[NotInferedK,NotInferedEV]], actual: DataSet[Edge[Long,Long]]
Type mismatch,expected:
org.apache.flink.api.java.ExecutionEnvironment, actual: org.apache.flink.api.scala.ExecutionEnvironment
1条答案
按热度按时间e1xvtsh31#
好像你进口了
Graph
来自gelly的JavaAPI。尝试导入的scala版本Graph
使用import org.apache.flink.graph.scala.Graph
. 这会解决你的问题。