I'm using titan db 1.0.0
backed by a local dynamodb
instance (which uses the 3.0 tinkerpop
stack). I've spent more time than I'd like to admit trying to figure out why drop() wasn't working. In my use case I'm trying to remove a specific edge found via a traversal, but even graph.traversal().V().drop()
wasn't working. I did much googling, but perhaps not with the right keywords. I finally figured out the issue which I'll specify in my answer. Hopefully others find this useful.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
I finally remembered reading somewhere (unfortunately I can't find it now to share the link edit:see the link provided by Stephen Mallete), that when dealing with gremlin in java-land, you needed to explicitly iterate the traversal.
So the trick was
graph.traversal().V().drop().iterate()
. Note this is not needed when using the gremlin console (at least with 3.0). You can just usegraph.traversal().V().drop()
.You could try the following to clear your graph:
This essentially drops the keyspace in Cassandra and clears the graph completely including indexing.
you need to commit it after traversal.
example: