Re: Remote Traversal with Java


HadoopMarc <bi...@...>
 

Hi Peter,

This seems more relevant:
https://docs.janusgraph.org/basics/configured-graph-factory/#graph-and-traversal-bindings

So, some JanusGraph and GraphTraversalSource objects are created remotely with names following a convention. You cannot assign the instances locally.

Best wishes,    Marc

Op donderdag 31 december 2020 om 12:25:10 UTC+1 schreef HadoopMarc:

Hi Peter,

Have you tried the suggestions from an earlier thread:


Best wishes,    Marc

Op woensdag 30 december 2020 om 20:06:36 UTC+1 schreef Peter Borissow:
Dear All,
    I have installed/configured a single node JanusGraph Server with a Berkeley database backend and ConfigurationManagementGraph support so that I can create/manage multiple graphs on the server. 

In a Gremlin console on my desktop I can connect to the remote server, create graphs, create vertexes, etc.   

In Java code on my desktop, I can connect to the remote server and issue commands via Client.submit() method. However, I cannot figure out how to open a specific graph on the server and get a traversal. In the Gremlin console it is as simple as this:

gremlin> :remote connect tinkerpop.server conf/remote.yaml session 
gremlin> :remote console  
gremlin> graph = ConfiguredGraphFactory.open("test"); 
gremlin> g = graph.traversal();  

In Java, once I connect to the server/cluster and create a client connection, I think it should be as simple as this:

DriverRemoteConnection conn = DriverRemoteConnection.using(client, name);
GraphTraversalSource g = AnonymousTraversalSource.traversal().withRemote(conn);  

More info here:

Any help/guidance would be greatly appreciated!

Thanks,
Peter

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