google-cloud-platform - JanusGraph 大规模数据摄取
问题描述
我们正在使用 python 在 Kubernetes (GCP) 上的 Janusgraph 中摄取数据。我们正在做多线程、节点链接、索引,但我们仍然能够在 60 分钟内从 bigquery 中提取 100k(节点)记录。
Kubernetes 规范 - 1 个 Pod,具有 25 个 vCPU 和 150 GiB RAM ids.block-size = 1000 万线程池 - 16 个节点池 - 16 个堆大小 - 4 gb
问题:
我们可以采取任何其他方法来提高摄取性能,从而减少总体时间。
我们可以通过 Python 驱动程序使用 Janusgraph 一次创建多少个多个连接。目前我们能够创建 30 个线程(连接),但是当我们增加线程数时,连接要么卡住,要么性能下降。
任何细节/帮助将不胜感激
Gremlin 查询:gV().hasLabel("http://purl.uniprot.org/core/Helix_Annotation").has("id", "http://purl.uniprot.org/uniprot/P06931#SIPC5C5063B7561AB45") .has("node_id", "http://purl.uniprot.org/uniprot/P06931#SIPC5C5063B7561AB45").has("rdf_type", "http://purl.uniprot.org/uniprot/").has( "http://purl.uniprot.org/core/range", "http://purl.uniprot.org/range/22571007582875950tt125tt127").fold().coalesce(unfold(), addV("http:// purl.uniprot.org/core/Helix_Annotation").property("id", "http://purl.uniprot.org/uniprot/P06931#SIPC5C5063B7561AB45").property("node_id", "http://purl. uniprot.org/uniprot/P06931#SIPC5C5063B7561AB45").property("rdf_type", "http://purl.uniprot.org/uniprot/").property("http://purl.uniprot.org/core/range", "http://purl.uniprot.org/range/22571007582875950tt125tt127")).V().hasLabel("http://www.w3.org/1999/ 02/22-rdf-syntax-ns#Statement").has("id", "http://purl.uniprot.org/uniprot/#_kb.P06931_up.annotation_FA85AD309172A9A7").has("node_id", "http ://purl.uniprot.org/uniprot/#_kb.P06931_up.annotation_FA85AD309172A9A7").has("rdf_type", "http://purl.uniprot.org/uniprot/").has("http://purl .uniprot.org/core/attribution", "http://purl.uniprot.org/uniprot/P06931#attribution-AE0E09C5B47CC2714C9061D3806995B4").fold().coalesce(unfold(), addV("http://www. w3.org/1999/02/22-rdf-syntax-ns#Statement").property("id", "http://purl.uniprot.org/uniprot/#_kb.P06931_up.annotation_FA85AD309172A9A7")。属性(“node_id”,“http://purl.uniprot.org/uniprot/#_kb.P06931_up.annotation_FA85AD309172A9A7”).property(“rdf_type”,“http://purl.uniprot.org/uniprot/”)。属性(“http://purl.uniprot.org/core/attribution”,“http://purl.uniprot.org/uniprot/P06931#attribution-AE0E09C5B47CC2714C9061D3806995B4”))
解决方案
您是否尝试过使用 groovy 脚本?我能够在约 10 秒的单线程内将约 5K 节点插入到具有更少 RAM 和 CPU 的 Janusgraph 中。
推荐阅读
- python - 在列中定期获取最新值
- java - Gluon client-maven-plugin 生成无法运行的 exe 文件
- java - 文本文件上的 Java RegEx
- r - data.table SD 使用 NA 填充返回每个组所要求的尽可能多的行,而不是现有的尽可能多的行
- c# - 添加消费者而不将 MassTransit 添加到依赖注入容器
- python - 有什么方法可以让 Jupyter 笔记本脚本作为 (i)python 脚本工作?
- angular - RxJS - 管道可观察的重新运行过于频繁
- .htaccess - 301 重定向根目录而不将新根目录级联到所有其他 301 重定向
- ocaml - 当 let* _ = 时,let* 有更好的语法吗?
- react-native - expo 弹出后在项目上运行 react-native start 时出错