Remote Traversal with Java

93 views
Skip to first unread message

Peter Borissow

unread,
Dec 30, 2020, 2:06:36 PM12/30/20
to JanusGraph users
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

HadoopMarc

unread,
Dec 31, 2020, 6:25:10 AM12/31/20
to JanusGraph users
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:

HadoopMarc

unread,
Dec 31, 2020, 6:34:48 AM12/31/20
to JanusGraph users
Hi Peter,

This seems more relevant:

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:
Reply all
Reply to author
Forward
0 new messages