Re: Where are my edges?


HadoopMarc <marc.d...@...>
 

All graph mutations are realized within a (hidden) transaction. You have to commit() the transaction before the changes are visible to other clients. So, look for .commit methods in the gremlin-scala API .

Cheers,    Marc

Op donderdag 31 augustus 2017 09:33:33 UTC+2 schreef ya...@...:

I am using gremlin-scala.

I connect to remote janus server that forked cassandra using:


val conf = new BaseConfiguration()
conf.setProperty("storage.backend", "cassandra")
conf.setProperty("storage.hostname", "my-ip")
conf.setProperty("index.search.hostname", "my-ip")
val graph = JanusGraphFactory.open(conf).asScala

I create vertexes and edges:

val cityA = graph + (location, name -> "City-A", population -> 400000)
val cityB= graph + (location, name -> "CityB", population -> 300000)


cityB<-- ("Road", distance -> 92) --> cityA 

and If I query these - everything is ok.

however, if I look up the vertexes in another client:

val telAviv = graph.V().has(name,"TelAviv").head()

my queries (for example find all paths from V1 to V2) don't work.

It's as it they are not stored in the DB and are only available during the same run that created them.

What am I doing wrong?

Join janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.