首页 > 解决方案 > 如何使用图形引擎作为 Janusgraph 和存储后端作为 cassandra 更改 gremlin 中的属性键?

问题描述

我正在使用 cassandra 4.0 和 Janusgraph 6.0,我有 n 个节点,Label 为“januslabel”,属性为“janusproperty”,我想将属性名称更改为“myproperty”,我已经尝试了这个链接的答案,Rename property with Gremlin在 Azure Cosmos DB 中 ,但我无法永久执行此操作,我永久的意思是,每当我重新启动 cassandra 或 janusgraph 时,我都会得到旧的属性名称“janusproperty”。

我怎样才能永久改变它?

标签: cassandragremlingraph-databasesjanusgraphgremlin-server

解决方案


使用 JanusGraph 时,如果当前没有事务打开,一旦发出 Gremlin 查询,就会自动启动一个事务。后续查询也是该事务的一部分。需要显式提交事务才能使用类似graph.tx().commit(). 未提交的事务最终将超时并且更改将丢失。


推荐阅读