Graph x
EdgeRDD
Edge
srcId: VertexId
desId: VertexId
attr: ID
EdgeDirection
class EdgeDirection extends Serializable
def reverse: EdgeDirection = this match{
case EdgeDirection.In/Out/Either/Both
}
vertext table
routing table
routing table
vertex Array[partitionId]
Edge Table
4中partition策略
应用:
-- Graph
<= vertex RDD , Edge RDD
-> GraphImpl
-> GraphOps 图处理引擎 (含 pagerank)
-> Pregal
-> GraphLoader 外部导入图 edgeListFile 方向/边/点
keyo serialization import
conf/spark-defaults.conf:
spark.kryo.regisrator org.apache.spark.grapx.GraphxKryoRegistrator
spark.serializer org.apache.spark.serializer.KryoSerializer