graph-databases - Janugraph REINDEX 卡在 INSTALLED 中
问题描述
我从 CSV 文件将图表加载到 Janusgraph 中。加载数据后,我尝试使用compositeIndex
. 建立索引后,状态将停留在INSTALLED
状态中。
mgmt=graph.openManagement()
mgmt.getOpenTransactions().size()
==> 0
我已经完成了所有交易。
mgmt.buildIndex("querySpeedUp", Vertex.class).addKey(experimentid).addKey(regionid).addKey(sourcemfield).addKey(zcentroid).addKey(sourcesfield).buildCompositeIndex()
mgmt.awaitGraphIndexStatus(graph, 'fastTraversal').call()
mgmt.commit()
//opened new connection
mgmt = graph.openManagement()
gremlin> propkey = mgmt.getPropertyKey('experimentid')
==>experimentid
gremlin> byName.getIndexStatus(propkey);
==>INSTALLED
gremlin> mgmt.updateIndex(byName, SchemaAction.REGISTER_INDEX).get()
==>null
gremlin> byName.getIndexStatus(propkey);
==>INSTALLED
gremlin> mgmt.commit()
==>null
gremlin> mgmt = graph.openManagement()
==>org.janusgraph.graphdb.database.management.ManagementSystem@5f025000
gremlin> byName.getIndexStatus(propkey);
==>INSTALLED
gremlin> mgmt.awaitGraphIndexStatus(graph, 'querySpeedUp').call()
==>GraphIndexStatusReport[success=false, indexName='querySpeedUp', targetStatus=[REGISTERED], notConverged={sourcemfield=INSTALLED, sourcesfield=INSTALLED, regionid=INSTALLED, zcentroid=INSTALLED, experimentid=INSTALLED}, converged={}, elapsed=PT1M0.099S]
解决方案
我知道这是一个老问题,但对于其他被这个问题困扰的人,我发现我不得不打电话graph.tx().commit()
给mgmt.commit()
我,它为我解决了这个问题。
推荐阅读
- php - 使用 ajax 上传录制的视频文件
- java - org.apache.poi 中的异常
- d3.js - D3 Y 轴缩放与线路径过渡
- kotlin - 来自 2 个现有数组的 kotlin distinct() 或 distinctBy {}
- python-3.x - 为什么 (ModuleNotFoundError: No module named 'scapy') 出现?
- ubuntu - NGINX 多个反向代理
- java - 在具有两个数据集(训练和测试集)的神经网络上需要帮助
- javascript - 返回一个 16 位 UUID,其中在第 7、11、15 和第 19 位我需要添加一个 hiphen
- hash - 两个 SHA-256 哈希的异或
- java - http.antMatcher("/**") .authorizeRequests().antMatchers("/") 中的antMatcher("/**") 需要什么?