-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nebula VertexID是String 类型时loadVerticesToGraphx 报错,类型转换失败。 #42
Comments
可以补充下你的 nebula 和 spark connector 的版本号吗? |
Graphx的VertexRDD是只允许vertexId为Long类型,且connector内部做String id 映射为Long id不太合适,应为需要将对应的映射结果也返回给用户,因为使用者还需要映射信息对 数据处理后的结果 进行映射回原来的String id。 所以当id是字符型时,可以直接读取DataFrame数据,然后进行转换。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
nebula 点集合VertexID类型是String, 在调用loadVerticesToGraphx 时候 报错 Long类型转换报错。
下面是修改后可以正常运行:type VertexID = String
package object connector {
type Address = (String, Int)
type NebulaType = Int
type Prop = List[Any]
type PropertyNames = List[String]
type PropertyValues = List[Any]
// 是否可以将VertextID 值改为 String 。 Long转String 没问题, 但String 未必能成功转换成Long
//type VertexID = Long
type VertexID = String
type VertexIDSlice = String
type NebulaGraphxVertex = (VertexID, PropertyValues)
type NebulaGraphxEdge = org.apache.spark.graphx.Edge[(EdgeRank, Prop)]
type EdgeRank = Long
The text was updated successfully, but these errors were encountered: