无法为状态为[INSTALLED]的索引调用更新操作[REINDEX] [英] Update action [REINDEX] cannot be invoked for index with status [INSTALLED]

查看:376
本文介绍了无法为状态为[INSTALLED]的索引调用更新操作[REINDEX]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注此博客: https://developer.ibm.com/dwblog/2018 /janusgraph-composite-mixed-indexes-traversals/

I am following this blog: https://developer.ibm.com/dwblog/2018/janusgraph-composite-mixed-indexes-traversals/

代码:

gremlin> graph.tx().rollback()
==>null
gremlin> mgmt = graph.openManagement()
==>org.janusgraph.graphdb.database.management.ManagementSystem@19472803
gremlin> code = mgmt.getPropertyKey('code')
==>code
gremlin> mgmt.buildIndex('byCodeComposite', Vertex.class).addKey(code).buildCompositeIndex()
==>byCodeComposite
gremlin> mgmt.commit()
==>null
gremlin> mgmt.awaitGraphIndexStatus(graph, 'byCodeComposite').call()
==>GraphIndexStatusReport[success=False, indexName='byCodeComposite', targetStatus=[REGISTERED], notConverged={}, converged={code=REGISTERED}, elapsed=PT0.012S]

错误:

But i am getting this: ==>GraphIndexStatusReport[success=false, indexName='byCodeComposite', targetStatus=[REGISTERED], notConverged={code=INSTALLED}, converged={}, elapsed=PT1M0.413S]

But i am getting this: ==>GraphIndexStatusReport[success=false, indexName='byCodeComposite', targetStatus=[REGISTERED], notConverged={code=INSTALLED}, converged={}, elapsed=PT1M0.413S]

版本: 卡桑德拉:3.11.3 elasticsearch:6.5.4 janusgraph:0.3.1-hadoop2

Versions: Cassandra: 3.11.3 elasticsearch: 6.5.4 janusgraph: 0.3.1-hadoop2

我正在尝试解决此问题,但是它对我不起作用.

I am trying to solve this but it is not working for me.

推荐答案

抱歉,您在跟踪博客时遇到了麻烦.

Sorry you're having trouble following along with the blog.

我注意到的一件事可能不是引起此错误,但可能引起其他问题的原因是您使用的Cassandra和ES的版本不在

One thing I'm noticing that probably isn't causing this error, but might cause other issues is that the versions of Cassandra and ES you're using aren't in the compatibility matrix for 0.3.1.

除此之外,还有一些我去年编写的索引的疑难解答提示,这些索引从未发布.希望它有助于解决您的问题.也许我会在不久的将来发布这篇文章的其余部分.

Outside of that here are some troubleshooting tips for indexes I wrote up last year and never got around to publishing. Hopefully it helps solve your issue. Maybe I'll get around to posting the rest of the article in the near future.

故障排除索引:

在创建索引时,如果存在任何过时的管理会话或未完成的事务,则它们的索引可能会停留在INSTALLED状态.如果您不熟悉JanusGraph索引的生命周期,则可以使用 JanusGraph Wiki页面来绘制索引状态和生命周期

When creating an index if there are any stale management sessions or open transactions they index might get stuck in the INSTALLED state. If you are unfamiliar with the lifecycle of a JanusGraph index there is a JanusGraph wiki pages that diagrams the index states and lifecycle

gremlin> graph.getOpenTransactions()
==>standardjanusgraphtx[0x14ba9376]
==>standardjanusgraphtx[0x477aaf55]

要回滚所有事务,您可以运行下面的命令,直到它们全部回滚为止,或者您可以编写一个循环以正确次数运行它.我个人更喜欢按下并输入几次,而不需要额外输入.

To rollback all the transactions you can ran the command below until they're all rolled back or you could write a loop to run it the correct number of times. I personally prefer pressing up and enter a few times over the extra typing.

graph.getOpenTransactions().getAt(0).rollback()

要查看是否有任何过时的管理实例,可以运行getOpenInstances()方法. JanusGraph文档的故障和恢复部分中也对此进行了记录.如果看到多个管理实例打开,则可以使用forceCloseInstance方法,如下所示.

To see if there are any stale management instances you can run the getOpenInstances() method. This is also documented in the failure and recovery section of the JanusGraph docs. If you see multiple management instances open, you can use the forceCloseInstance method as shown below.

gremlin> mgmt = graph.openManagement()
gremlin> mgmt.getOpenInstances()
==>0934f2eb69223-Chriss-MacBook-Pro-2-local2
==>0729845962091-remoteMachine1
gremlin> mgmt.forceCloseInstance('0729845962091-remoteMachine1') 
gremlin> mgmt.commit()

这篇关于无法为状态为[INSTALLED]的索引调用更新操作[REINDEX]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆