Gremlin命令行加载Graph of the Gods(官网入门Demo) GraphOfTheGodsFactory.load(graph)
shell
报错信息:后端
org.janusgraph.core.SchemaViolationException: Adding this property for key [~T$SchemaName] and value [rtname] violates a uniqueness constraint [SystemIndex#~T$SchemaName]
bash
适用于其余SchemaViolationException(模式冲突)的状况推定post
指Schema冲突,[rtname]违反了惟一性约束。SchemaName这一属性是惟一的,添加的值与先前存在的值冲突。 这是因为先前已经加载过Graph of the Gods,load命令已经执行过,存储中已存在相同的数据了,再次添加数据形成。学习
不须要执行GraphOfTheGodsFactory.load(graph)
语句,直接进行示例查询。this
gremlin> g = graph.traversal()
==>graphtraversalsource[standardjanusgraph[cql:[127.0.0.1]], standard]
gremlin> saturn = g.V().has('name', 'saturn').next()
==>v[256]
gremlin> g.V(saturn).valueMap()
==>[name:[saturn], age:[10000]]
gremlin> g.V(saturn).in('father').in('father').values('name')
==>hercules
复制代码
JanusGraphFactory.drop(graph)
Could not re-open management log
org.janusgraph.core.JanusGraphException: Could not re-open management logspa
或者:命令行
GraphOfTheGodsFactory.load(graph)
便可。 HBase中默认的数据表名是“janusgraph”笔记持续更新,欢迎关注。若有帮助,点赞便是鼓励!cdn