Re: Configured graph factory not working after making changes to gremlin-server.yaml
hadoopmarc@...
Hi Sai,
In your last post a line with ConfiguredGraphFactory.createConfiguration(new MapConfiguration(map)); is missing.
A complete working transcript that works out of the box from the janusgraph-full-0.5.3:
Terminal1
bin/gremlin-server.sh conf/gremlin-server/gremlin-server-configuration-inmemory.yaml
Terminal2
bin/gremlin.sh
gremlin> :remote connect tinkerpop.server conf/remote.yaml session
==>Configured localhost/127.0.0.1:8182-[96f366a4-9255-488a-b891-134df4a5f8a6]
gremlin> :remote console
==>All scripts will now be sent to Gremlin Server - [localhost/127.0.0.1:8182]-[96f366a4-9255-488a-b891-134df4a5f8a6] - type ':remote console' to return to local mode
gremlin> ConfiguredGraphFactory.getGraphNames()
gremlin> map = new HashMap<String, Object>();
gremlin> map.put("storage.backend", "inmemory");
==>null
gremlin> map.put("graph.graphname", "graph1");
==>null
gremlin> ConfiguredGraphFactory.createConfiguration(new MapConfiguration(map));
==>null
gremlin> graph1 = ConfiguredGraphFactory.open("graph1");
==>standardjanusgraph[inmemory:[127.0.0.1]]
gremlin> g1 = graph1.traversal()
==>graphtraversalsource[standardjanusgraph[inmemory:[127.0.0.1]], standard]
gremlin>
Best wishes, Marc
In your last post a line with ConfiguredGraphFactory.createConfiguration(new MapConfiguration(map)); is missing.
A complete working transcript that works out of the box from the janusgraph-full-0.5.3:
Terminal1
bin/gremlin-server.sh conf/gremlin-server/gremlin-server-configuration-inmemory.yaml
Terminal2
bin/gremlin.sh
gremlin> :remote connect tinkerpop.server conf/remote.yaml session
==>Configured localhost/127.0.0.1:8182-[96f366a4-9255-488a-b891-134df4a5f8a6]
gremlin> :remote console
==>All scripts will now be sent to Gremlin Server - [localhost/127.0.0.1:8182]-[96f366a4-9255-488a-b891-134df4a5f8a6] - type ':remote console' to return to local mode
gremlin> ConfiguredGraphFactory.getGraphNames()
gremlin> map = new HashMap<String, Object>();
gremlin> map.put("storage.backend", "inmemory");
==>null
gremlin> map.put("graph.graphname", "graph1");
==>null
gremlin> ConfiguredGraphFactory.createConfiguration(new MapConfiguration(map));
==>null
gremlin> graph1 = ConfiguredGraphFactory.open("graph1");
==>standardjanusgraph[inmemory:[127.0.0.1]]
gremlin> g1 = graph1.traversal()
==>graphtraversalsource[standardjanusgraph[inmemory:[127.0.0.1]], standard]
gremlin>
Best wishes, Marc