首页 > 解决方案 > 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-databasesjanusgraph

解决方案


我知道这是一个老问题,但对于其他被这个问题困扰的人,我发现我不得不打电话graph.tx().commit()mgmt.commit()我,它为我解决了这个问题。


推荐阅读