cassandra - 如何使用图形引擎作为 Janusgraph 和存储后端作为 cassandra 更改 gremlin 中的属性键?
问题描述
我正在使用 cassandra 4.0 和 Janusgraph 6.0,我有 n 个节点,Label 为“januslabel”,属性为“janusproperty”,我想将属性名称更改为“myproperty”,我已经尝试了这个链接的答案,Rename property with Gremlin在 Azure Cosmos DB 中 ,但我无法永久执行此操作,我永久的意思是,每当我重新启动 cassandra 或 janusgraph 时,我都会得到旧的属性名称“janusproperty”。
我怎样才能永久改变它?
解决方案
使用 JanusGraph 时,如果当前没有事务打开,一旦发出 Gremlin 查询,就会自动启动一个事务。后续查询也是该事务的一部分。需要显式提交事务才能使用类似graph.tx().commit()
. 未提交的事务最终将超时并且更改将丢失。
推荐阅读
- java - SWT 控件 setRedraw 行为
- android - kotlin 开始时没有按预期工作。过滤器不匹配
- java - @Valid 和 @NotNull 注释不会在 post 请求中捕获空字段
- javascript - 为什么 querySelector 不能与 v-for 一起使用?
- javascript - Cypress:根据另一个子元素获取父元素的子元素
- android - 以编程方式设置的 Android 约束布局不正确
- javascript - 例外:对 https://www.facebook.com 的请求失败,返回代码 404。截断的服务器响应:
- c++ - CGAL 如何将属性从 Point_set 复制到 Surface 网格
- google-sheets - 基于 Google 表格中的多个其他单元格的单元格条件格式
- r - 如何将名称(df)转换为数据框?