Making janus graph client to not use QUORUM


anjanisingh22@...
 

Thanks Marc, i will try that option.


hadoopmarc@...
 

Hi Anjani,

To see what exactly happens with local configurations, I did the following:
  • from the binary janusgraph distribution I started janusgraph with "bin/janusgraph.sh start" (this implicitly uses conf/janusgraph-cql-es.properties)
  • I made a copy of conf/janusgraph-cql-es.properties in which I added your storage.cql.read-consistency-level=LOCAL_ONE
  • In gremlin console I ran the code below (using JanusGraph in an embedded way, no remote connection):
graph = JanusGraphFactory.open('conf/janusgraph-cql-es-local-one.properties')
conf = graph.getConfiguration().getLocalConfiguration()
ks = conf.getKeys(); null;
while (ks.hasNext()) {
  k = ks.next()
  System.out.print(String.format("%30s: %s\n", k, conf.getProperty(k)))
}
With printed output:
              storage.hostname: 127.0.0.1
storage.cql.read-consistency-level: LOCAL_ONE
                cache.db-cache: true
          storage.cql.keyspace: janusgraph
               storage.backend: cql
         index.search.hostname: 127.0.0.1
           cache.db-cache-size: 0.25
                 gremlin.graph: org.janusgraph.core.JanusGraphFactory

Can you do the same printing of configurations on the client that shows the exception about the QUORUM?
In this way, we can check whether the problem is in your code or in JanusGraph not properly passing the  local configurations.

Best wishes,    Marc


anjanisingh22@...
 

Hi All,

I am trying to create nodes in graph and while reading created node id i am getting below exception:

org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend at io.vavr.API$Match$Case0.apply(API.java:3174)

at io.vavr.API$Match.of(API.java:3137)

at org.janusgraph.diskstorage.cql.CQLKeyColumnValueStore.lambda$static$0(CQLKeyColumnValueStore.java:125)

at io.vavr.control.Try.getOrElseThrow(Try.java:671)

at org.janusgraph.diskstorage.cql.CQLKeyColumnValueStore.getSlice(CQLKeyColumnValueStore.java:292)

at org.janusgraph.diskstorage.configuration.backend.KCVSConfiguration$3.call(KCVSConfiguration.java:177)

at org.janusgraph.diskstorage.configuration.backend.KCVSConfiguration$3.call(KCVSConfiguration.java:174)

at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:147)

at org.janusgraph.diskstorage.util.BackendOperation$1.call(BackendOperation.java:161)

at org.janusgraph.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:68)

... 26 more

Caused by: com.datastax.driver.core.exceptions.ReadTimeoutException: Cassandra timeout during read query at consistency QUORUM (3 responses were required but only 2 replica responded)


I am trying to update janus client to not use QUORUM but LOCAL_ONE.  Setting below property but its not working.

 

JanusGraphFactory.Builder configProps = JanusGraphFactory.build();      configProps.set("storage.cql.read-consistency-level", “LOCAL_ONE”);

 

In CQLTransaction class i see its getting set by reading value from CustomOption

public CQLTransaction(final BaseTransactionConfig config) {
super(config);
this.readConsistencyLevel = ConsistencyLevel.valueOf(getConfiguration().getCustomOption(READ_CONSISTENCY));
this.writeConsistencyLevel = ConsistencyLevel.valueOf(getConfiguration().getCustomOption(WRITE_CONSISTENCY));
}


I did tied  seeing value by using customOption() method of TransactionBuilder but no luck.

 

GraphTraversalSource g = janusGraph.buildTransaction()
.customOption("storage.cql.read-consistency-level","LOCAL_ONE")
.start().traversal();

 


Could you please help me to fix it?


Thanks & Regards,
Anjani