A very simple question,
I just updated my Titan from 0.54 to Titan 1.0 Hadoop 1 / TP3 version 3.01.
I have a problem deleting values
Property key: Cardinality.LIST/SET
Perhaps this is due to the upgrade process or just a misunderstanding of TP3.
tg = TitanFactory.open(c);
TitanManagement mg = tg.openManagement();
tm.makePropertyKey("myList").dataType(String.class).cardinality( Cardinality.LIST).make();
mg.commit();
Vertex v = tg.addVertex();
v.property("myList", "role1");
v.property("myList", "role2");
v.property("myList", "role3");
v.property("myList", "role4");
v.property("myList", "role4");
Now I want to delete all the values "role1, role2 ...."
// iterate over all values and try to remove the values
List<String> values = IteratorUtils.toList(v.values("myList"));
for (String val : values) {
v.property("myList", val).remove();
}
tg.tx().commit();
// ---------------- EXPECTED RESULT ----------: Empty vertex properties
But, unfortunately, the result is not empty:
System.out.println("Values After Delete" + IteratorUtils.toList(v.values("myList")));
// ------------------- OUTPUT --------------:
After removal, the values are still obvious!
15:19:59,780 INFO ThriftKeyspaceImpl:745 - Detected partitioner org.apache.cassandra.dht.Murmur3Partitioner for keyspace titan
15:19:59,784 INFO Values After Delete [role1, role2, role3, role4, role4]
Any ideas?