Guest User

Untitled

a guest
Feb 2nd, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. :remote connect tinkerpop.server conf/compose.yaml session
  2. :remote console
  3. graph=ConfiguredGraphFactory.create("mygraph")
  4. graph=ConfiguredGraphFactory.open("mygraph")
  5. g.addV("pat")
  6. g.tx().commit()
  7.  
  8. hosts: [portal-xxx.composedb.com]
  9. port: 15290
  10. username: admin
  11. password: pass
  12. connectionPool: { enableSsl: true }
  13. serializer: { className:
  14. org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0,
  15. config: { serializeResultToString: true } }
  16.  
  17. gremlin.remote.remoteConnectionClass=org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection
  18. # cluster file has the remote server configuration
  19. #gremlin.remote.driver.clusterFile=gremlin-console.yaml
  20. gremlin.remote.driver.clusterFile=/Users/julian.stephen/ibm.github/privacy-secbu/Privacy-DataViz/src/main/resources/gremlin-console.yaml
  21. # source name is the global graph traversal source defined on the server
  22. gremlin.remote.driver.sourceName=mygraph
  23.  
  24. Graph graph = EmptyGraph.instance();
  25. GraphTraversalSource g = graph.traversal().withRemote(conf);
  26. g.addV("Java Remote Test");
  27. g.close();
  28.  
  29. JanusGraph graph = ConfiguredGraphFactory.open("mygraph");
Add Comment
Please, Sign In to add comment