【问题标题】:How to calculate the PageRank and shortest path algorithm with gremlin in Amazon Neptune?如何在 Amazon Neptune 中使用 gremlin 计算 PageRank 和最短路径算法?
【发布时间】:2021-08-10 09:55:51
【问题描述】:

有没有办法在 Amazon Neptune 中使用 gremlin 计算 PageRankShortest Path 算法? 正如 gremlin 文档中所说的那样 PageRank centrality can be calculated with Gremlin with the pageRank()-step which is designed to work with GraphComputer (OLAP) based traversals.

我尝试通过以下代码使用 gremlinpython 创建遍历:g = graph.traversal().withComputer().withRemote(remoteConn),但出现此错误:GremlinServerError: 499: {"code":"UnsupportedOperationException","requestId":"4493df8b-b09f-47b1-b230-b83cfe1afa76","detailedMessage":"Graph does not support graph computer"}

那么是否可以在 Amazon Neptune 中使用 GraphComputer 遍历?

【问题讨论】:

    标签: gremlin amazon-neptune gremlinpython


    【解决方案1】:

    Amazon Neptune 目前不支持 Apache TinkerPop GraphComputer 接口。你有几个选择。

    1. 在某些情况下,可以使用Gremlin Recipes 文档中的示例查询来计算连通分量等。
    2. 使用 Neptune 导出工具导出数据并使用 Spark 运行您需要执行的分析(Glue 和 EMR 是不错的选择)。这在今天很常见。
    3. 对于中等大小的数据集,您可以将数据导入 NetworkX 并从 Jupyter Notebook 运行分析。

    【讨论】:

      猜你喜欢
      • 2016-06-02
      • 1970-01-01
      • 1970-01-01
      • 2021-12-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多