【发布时间】:2020-09-17 00:44:42
【问题描述】:
我使用 Apache Spark Graphx 框架从 s3 构建了一个属性图(6000 万个节点,4000 万条边)。 我想在这个图上触发遍历查询。
我的查询是这样的:-
g.V().has("name","xyz").out('parent').out().has('name','abc')
g.V().has('proc_name','serv.exe').out('file_create').
has('file_path',containing('Tsk04.txt')).in().in('parent').values('proc_name')
g.V().has('md5','935ca12348040410e0b2a8215180474e').values('files')
大部分查询的格式为g.V().out().out().out()
在 neo4j、titan、aws neptune 等图形数据库上很容易实现此类查询,因为它们支持 gremlin。
我们可以以这种方式遍历火花图吗? 我尝试了 spark pregel-api,但与 gremlin 相比它有点复杂。
我正在寻找 spark graph 的原因是因为上述 graphdbs 的云解决方案成本很高。
【问题讨论】:
-
你就不能把查询重写到 GraphX 吗?
-
或通过 Tinkerpop 使用 Spark-Gremlin? tinkerpop.apache.org/docs/3.0.1-incubating/#sparkgraphcomputer
标签: apache-spark gremlin graph-databases spark-graphx