Hbase read after write not working with janusgraph-0.6.1 but was working with janusgraph-0.6.1


Nikita Pande
 

So basically g.addV() is adding vertices in hbase server. But retrieval after restart of gremlin is not happening. 
Step1. In gremlin console, g2.addV() and g2.V().count() returns 124

Step2: Restart gremlin conosole and run g2.V().count()

gremlin> g2.V().count()

14:04:54 WARN  org.janusgraph.graphdb.transaction.StandardJanusGraphTx  - Query requires iterating over all vertices [()]. For better performance, use indexes

==>123

This is still the old value.

Howe ver same works with janusgraph-0.6.0


hadoopmarc@...
 

Hi Nikita,

Sorry for asking the obvious, but are you sure you committed the addV() transaction with a g2.tx().commit() before closing the Gremlin Console?

Best wishes,    Marc


Nikita Pande
 
Edited

Hi @hadoopmarc, thanks for reply.

Did this change after upgrade from v0.6.0 to v0.6.1? I couldnt find diff...It was working with v0.6.0 without tx().commit()

Now I am running following steps
g2.tx().begin()
g2.addV()
g2.tx().commit()
g2.V().count()

It seems to be fine now


hadoopmarc@...
 

Hi Nikita,

Possibly, your previous setup included JanusGraph Server and you had a remote connection from the Gremlin Console to JanusGraph Server. In that case, succesful gremlin requests are committed automatically, see: https://tinkerpop.apache.org/docs/current/reference/#considering-transactions

Marc


Nikita Pande
 
Edited

Hi @hadoopmarc,

Is there a difference between configuring janusgraph server conf ie gremlin-server.yaml
graphs: {
  graph: /etc/opt/janusgraph/janusgraph.properties
   
   

vs configuring it from console for eg: graph2=GraphFactory.open("/etc/opt/janusgraph/janusgraph.properties")?


hadoopmarc@...
 

Hi Nikita,

JanusGraph can be run as a server or in embedded mode. gremlin-server.yaml is for configuring JanusGraph Server. With JanusGraphFactory in the Gremlin Console you instantiate embedded JanusGraph. In the latter case you can query JanusGraph without a remote connection to JanusGraph Server.

See: https://docs.janusgraph.org/operations/deployment/

Marc