将Janusgraph从0.2.2升级到0.5.2

时间:2020-06-24 09:51:25

标签: cassandra gremlin janusgraph gremlin-server

我是Janusgraph的新手。我需要将Janausgraph版本从0.2.2(存储:cassandra,索引:es)升级到最新的稳定版本(0.5.2)。我已经浏览了docs / forums如何启动该过程(我只看到了changelog)。我无法找出明确/直接的解决方案。是进行增量升级(0.2.2> 0.x.x *> 0.5.2)还是直接升级(安装0.5.2,请尝试以某种方式转储cassandra数据,如果可行)

我尝试了第二遍,下载了最新的janusgraph(基本版和-full dist版),安装了最新的cassandra(311)和es(6xx,7xx)。我已经将旧的cassandra数据复制到了最新的cassandra(/ var / lib / cassandra)。我已经启动了服务器janusgraph和cassandra,它已经启动并正在运行。但是,当我尝试与janusgraph(通过gremlin服务器)进行交互时,它给出了诸如“ Gremlin groovy脚本引擎-非法参数异常”之类的错误

我发现这是不应该做的。我需要通过适当的导入/导出数据进行增量升级。

有人可以帮助我,我应该如何进一步进行增量升级。如何导出/导入所有janusgraph / gremlin服务器数据。

2 个答案:

答案 0 :(得分:1)

您将需要停止0.2实例,将配置graph.allow-upgrade = true设置为janusgraph.propertiessee here),然后在相同的Cassandra(或在需要时将旧的Cassandra / ES数据迁移到较新的Cassandra / ES实例)。

此后,一个好的实践是停止此0.5实例,删除graph.allow-upgrade设置,然后重新启动以正常使用,并仅在需要下一次升级时才进行更改。

答案 1 :(得分:1)

我差点忘了写答案了(不过可能有用)。

首先,不需要任何增量升级。我们可以使用简单的“导入/导出”命令进行升级。 到目前为止,共有3种不同的格式:json,xml和binary(gryo)。

克里姆林宫命令(gremlin-cli):

// Export from *version(0.2.2)*
graph = JanusGraphFactory.open('conf/gremlin-server/janusgraph-cql-es-server.properties')
graph.io(IoCore.gryo()).writeGraph('janusgraph_dump_2020_09_30_local.gryo')
graph.tx().commit()
// Import to *version(0.5.2)*
graph = JanusGraphFactory.open('conf/gremlin-server/janusgraph-cql-es-server.properties') 
graph.io(IoCore.gryo()).readGraph('janusgraph_dump_2020_09_30_local.gryo')
graph.tx().commit()

这解决了我的问题。