I am new to Janusgraph and using Cassandra as the backend database. I have a query which uses find all incoming edges to a node. For that I need to make the read consistency to ONE in Janusgraph configuration. I have tried the following configuration but am not able to get the correct read consistency:
public static JanusGraph create() {
JanusGraphFactory.Builder config = JanusGraphFactory.build();
config.set("storage.backend", "cassandrathrift");
config.set("storage.cassandra.keyspace", "cs_graph");
config.set("storage.cassandra.read-consistency-level","ONE");
config.set("storage.cassandra.write-consistency-level","ONE");
config.set("storage.cassandra.frame-size-mb", "128");
config.set("storage.cassandra.thrift.cpool.max-wait", 360000);
config.set("storage.hostname", "10.XXX.1.XXX");
config.set("connectionPool.keepAliveInterval","360000");
config.set("storage.cql.only-use-local-consistency-for-system-operations","true");
graph = config.open();
System.out.println("Graph = "+graph);
traversalSource = graph.traversal();
System.out.println("traversalSource = "+traversalSource);
getAllEdges();
return graph;
}
However, the client is still showing the CassandraTransaction in QUORUM level of consistency.
Here are the logs:
16:40:54.799 [main] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@25e2a451[read=QUORUM,write=QUORUM] 16:40:54.800 [main] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@1698ee84[read=QUORUM,write=QUORUM] All edges = 100000 16:40:55.754 [main] DEBUG o.j.g.database.StandardJanusGraph - Shutting down graph standardjanusgraph[cassandrathrift:[10.70.1.167]] using shutdown hook Thread[Thread-5,5,main] 16:40:55.755 [main] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@3e5499cc[read=QUORUM,write=QUORUM] 16:40:55.755 [main] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@67ab1c47[read=QUORUM,write=QUORUM] 16:40:56.113 [main] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@6821ea29[read=QUORUM,write=QUORUM] 16:40:56.542 [main] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@338494fa[read=QUORUM,write=QUORUM] 16:40:56.909 [main] INFO o.j.d.c.t.CassandraThriftStoreManager - Closed Thrift connection pooler.
Any suggestions on how to change this to ONE or LOCAL consistency level??