图计算框架乱斗

Flink: https://ci.apache.org/projects/flink/flink-docs-master/apis/batch/libs/gelly.html
GraphX: http://spark.apache.org/docs/latest/graphx-programming-guide.html
GraphLab: https://dato.com/learn/userguide/

GrappLab(Dato)

创建一张图

1
2
3
4
5
from graphlab import SFrame
edge_data = SFrame.read_csv('http://s3.amazonaws.com/dato-datasets/bond/bond_edges.csv')

g = SGraph()
g = g.add_edges(edge_data, src_field='src', dst_field='dst')

Spark GraphX

创建一张图

1
2
3
4
5
6
7
8
9
10
11
12
val users: RDD[(VertexId, (String, String))] = sc.parallelize(Array(
(3L, ("rxin", "student")),
(7L, ("jgonzal", "postdoc")),
(5L, ("franklin", "prof")),
(2L, ("istoica", "prof"))))
val relationships: RDD[Edge[String]] = sc.parallelize(Array(
Edge(3L, 7L, "collab"),
Edge(5L, 3L, "advisor"),
Edge(2L, 5L, "colleague"),
Edge(5L, 7L, "pi")))
val defaultUser = ("John Doe", "Missing")
val graph = Graph(users, relationships, defaultUser)

TODO


文章目录
  1. 1. GrappLab(Dato)
  2. 2. Spark GraphX