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